From 315fe8cbcb71a4936bacea0d1563a8c35e532738 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Tue, 25 Feb 2020 13:39:58 +0800 Subject: [PATCH] Changes to conform 2.0 --- .../services/machinelearning/registration.go | 6 + ...resource_arm_machine_learning_workspace.go | 12 +- .../services/web/mgmt/2019-08-01/web/apps.go | 10988 +++++++++------- .../web/mgmt/2019-08-01/web/models.go | 35 + 4 files changed, 6249 insertions(+), 4792 deletions(-) diff --git a/azurerm/internal/services/machinelearning/registration.go b/azurerm/internal/services/machinelearning/registration.go index ef813a45d58bd..5abf296bf6b41 100644 --- a/azurerm/internal/services/machinelearning/registration.go +++ b/azurerm/internal/services/machinelearning/registration.go @@ -11,6 +11,12 @@ func (r Registration) Name() string { return "Machine Learning" } +func (r Registration) WebsiteCategories() []string { + return []string{ + "Machine Learning", + } +} + // SupportedDataSources returns the supported Data Sources supported by this Service func (r Registration) SupportedDataSources() map[string]*schema.Resource { return map[string]*schema.Resource{ diff --git a/azurerm/internal/services/machinelearning/resource_arm_machine_learning_workspace.go b/azurerm/internal/services/machinelearning/resource_arm_machine_learning_workspace.go index d577d0063b528..7e4c7c2813f6d 100644 --- a/azurerm/internal/services/machinelearning/resource_arm_machine_learning_workspace.go +++ b/azurerm/internal/services/machinelearning/resource_arm_machine_learning_workspace.go @@ -15,6 +15,7 @@ import ( "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/tf" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/clients" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/features" + keyVaultValidate "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/keyvault/validate" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/machinelearning/parse" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/machinelearning/validate" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/tags" @@ -65,11 +66,10 @@ func resourceArmMachineLearningWorkspace() *schema.Resource { }, "key_vault_id": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - // TODO -- use the custom validation function of key vault - ValidateFunc: azure.ValidateResourceID, + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: keyVaultValidate.KeyVaultID, // TODO -- remove when issue https://github.com/Azure/azure-rest-api-specs/issues/8323 is addressed DiffSuppressFunc: suppress.CaseDifference, }, @@ -78,7 +78,7 @@ func resourceArmMachineLearningWorkspace() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, - // TODO -- use the custom validation function of storage account + // TODO -- use the custom validation function of storage account, when issue https://github.com/Azure/azure-rest-api-specs/issues/8323 is addressed ValidateFunc: azure.ValidateResourceID, // TODO -- remove when issue https://github.com/Azure/azure-rest-api-specs/issues/8323 is addressed DiffSuppressFunc: suppress.CaseDifference, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2019-08-01/web/apps.go b/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2019-08-01/web/apps.go index 071869632530a..e0869819af193 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2019-08-01/web/apps.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2019-08-01/web/apps.go @@ -2204,15 +2204,16 @@ func (client AppsClient) CreateOrUpdateDomainOwnershipIdentifierSlotResponder(re return } -// CreateOrUpdateHostNameBinding description for Creates a hostname binding for an app. +// CreateOrUpdateFunctionSecret description for Add or update a function secret. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// hostName - hostname in the hostname binding. -// hostNameBinding - binding details. This is the JSON representation of a HostNameBinding object. -func (client AppsClient) CreateOrUpdateHostNameBinding(ctx context.Context, resourceGroupName string, name string, hostName string, hostNameBinding HostNameBinding) (result HostNameBinding, err error) { +// name - site name. +// functionName - the name of the function. +// keyName - the name of the key. +// key - the key to create or update +func (client AppsClient) CreateOrUpdateFunctionSecret(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, key KeyInfo) (result KeyInfo, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateHostNameBinding") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateFunctionSecret") defer func() { sc := -1 if result.Response.Response != nil { @@ -2226,34 +2227,35 @@ func (client AppsClient) CreateOrUpdateHostNameBinding(ctx context.Context, reso 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", "CreateOrUpdateHostNameBinding", err.Error()) + return result, validation.NewError("web.AppsClient", "CreateOrUpdateFunctionSecret", err.Error()) } - req, err := client.CreateOrUpdateHostNameBindingPreparer(ctx, resourceGroupName, name, hostName, hostNameBinding) + req, err := client.CreateOrUpdateFunctionSecretPreparer(ctx, resourceGroupName, name, functionName, keyName, key) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostNameBinding", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateFunctionSecret", nil, "Failure preparing request") return } - resp, err := client.CreateOrUpdateHostNameBindingSender(req) + resp, err := client.CreateOrUpdateFunctionSecretSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostNameBinding", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateFunctionSecret", resp, "Failure sending request") return } - result, err = client.CreateOrUpdateHostNameBindingResponder(resp) + result, err = client.CreateOrUpdateFunctionSecretResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostNameBinding", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateFunctionSecret", resp, "Failure responding to request") } return } -// CreateOrUpdateHostNameBindingPreparer prepares the CreateOrUpdateHostNameBinding request. -func (client AppsClient) CreateOrUpdateHostNameBindingPreparer(ctx context.Context, resourceGroupName string, name string, hostName string, hostNameBinding HostNameBinding) (*http.Request, error) { +// CreateOrUpdateFunctionSecretPreparer prepares the CreateOrUpdateFunctionSecret request. +func (client AppsClient) CreateOrUpdateFunctionSecretPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, key KeyInfo) (*http.Request, error) { pathParameters := map[string]interface{}{ - "hostName": autorest.Encode("path", hostName), + "functionName": autorest.Encode("path", functionName), + "keyName": autorest.Encode("path", keyName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -2268,43 +2270,43 @@ func (client AppsClient) CreateOrUpdateHostNameBindingPreparer(ctx context.Conte autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}", pathParameters), - autorest.WithJSON(hostNameBinding), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}", pathParameters), + autorest.WithJSON(key), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// CreateOrUpdateHostNameBindingSender sends the CreateOrUpdateHostNameBinding request. The method will close the +// CreateOrUpdateFunctionSecretSender sends the CreateOrUpdateFunctionSecret request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) CreateOrUpdateHostNameBindingSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) CreateOrUpdateFunctionSecretSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// CreateOrUpdateHostNameBindingResponder handles the response to the CreateOrUpdateHostNameBinding request. The method always +// CreateOrUpdateFunctionSecretResponder handles the response to the CreateOrUpdateFunctionSecret request. The method always // closes the http.Response Body. -func (client AppsClient) CreateOrUpdateHostNameBindingResponder(resp *http.Response) (result HostNameBinding, err error) { +func (client AppsClient) CreateOrUpdateFunctionSecretResponder(resp *http.Response) (result KeyInfo, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// CreateOrUpdateHostNameBindingSlot description for Creates a hostname binding for an app. +// CreateOrUpdateFunctionSecretSlot description for Add or update a function secret. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// hostName - hostname in the hostname binding. -// hostNameBinding - binding details. This is the JSON representation of a HostNameBinding object. -// slot - name of the deployment slot. If a slot is not specified, the API will create a binding for the -// production slot. -func (client AppsClient) CreateOrUpdateHostNameBindingSlot(ctx context.Context, resourceGroupName string, name string, hostName string, hostNameBinding HostNameBinding, slot string) (result HostNameBinding, err error) { +// name - site name. +// functionName - the name of the function. +// keyName - the name of the key. +// slot - name of the deployment slot. +// key - the key to create or update +func (client AppsClient) CreateOrUpdateFunctionSecretSlot(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, slot string, key KeyInfo) (result KeyInfo, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateHostNameBindingSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateFunctionSecretSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -2318,34 +2320,35 @@ func (client AppsClient) CreateOrUpdateHostNameBindingSlot(ctx context.Context, 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", "CreateOrUpdateHostNameBindingSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "CreateOrUpdateFunctionSecretSlot", err.Error()) } - req, err := client.CreateOrUpdateHostNameBindingSlotPreparer(ctx, resourceGroupName, name, hostName, hostNameBinding, slot) + req, err := client.CreateOrUpdateFunctionSecretSlotPreparer(ctx, resourceGroupName, name, functionName, keyName, slot, key) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostNameBindingSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateFunctionSecretSlot", nil, "Failure preparing request") return } - resp, err := client.CreateOrUpdateHostNameBindingSlotSender(req) + resp, err := client.CreateOrUpdateFunctionSecretSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostNameBindingSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateFunctionSecretSlot", resp, "Failure sending request") return } - result, err = client.CreateOrUpdateHostNameBindingSlotResponder(resp) + result, err = client.CreateOrUpdateFunctionSecretSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostNameBindingSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateFunctionSecretSlot", resp, "Failure responding to request") } return } -// CreateOrUpdateHostNameBindingSlotPreparer prepares the CreateOrUpdateHostNameBindingSlot request. -func (client AppsClient) CreateOrUpdateHostNameBindingSlotPreparer(ctx context.Context, resourceGroupName string, name string, hostName string, hostNameBinding HostNameBinding, slot string) (*http.Request, error) { +// CreateOrUpdateFunctionSecretSlotPreparer prepares the CreateOrUpdateFunctionSecretSlot request. +func (client AppsClient) CreateOrUpdateFunctionSecretSlotPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, slot string, key KeyInfo) (*http.Request, error) { pathParameters := map[string]interface{}{ - "hostName": autorest.Encode("path", hostName), + "functionName": autorest.Encode("path", functionName), + "keyName": autorest.Encode("path", keyName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), @@ -2361,42 +2364,41 @@ func (client AppsClient) CreateOrUpdateHostNameBindingSlotPreparer(ctx context.C 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}/hostNameBindings/{hostName}", pathParameters), - autorest.WithJSON(hostNameBinding), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}", pathParameters), + autorest.WithJSON(key), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// CreateOrUpdateHostNameBindingSlotSender sends the CreateOrUpdateHostNameBindingSlot request. The method will close the +// CreateOrUpdateFunctionSecretSlotSender sends the CreateOrUpdateFunctionSecretSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) CreateOrUpdateHostNameBindingSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) CreateOrUpdateFunctionSecretSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// CreateOrUpdateHostNameBindingSlotResponder handles the response to the CreateOrUpdateHostNameBindingSlot request. The method always +// CreateOrUpdateFunctionSecretSlotResponder handles the response to the CreateOrUpdateFunctionSecretSlot request. The method always // closes the http.Response Body. -func (client AppsClient) CreateOrUpdateHostNameBindingSlotResponder(resp *http.Response) (result HostNameBinding, err error) { +func (client AppsClient) CreateOrUpdateFunctionSecretSlotResponder(resp *http.Response) (result KeyInfo, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// CreateOrUpdateHybridConnection description for Creates a new Hybrid Connection using a Service Bus relay. +// CreateOrUpdateHostNameBinding description for Creates a hostname binding for an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - the name of the web app. -// namespaceName - the namespace for this hybrid connection. -// relayName - the relay name for this hybrid connection. -// connectionEnvelope - the details of the hybrid connection. -func (client AppsClient) CreateOrUpdateHybridConnection(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection) (result HybridConnection, err error) { +// name - name of the app. +// hostName - hostname in the hostname binding. +// hostNameBinding - binding details. This is the JSON representation of a HostNameBinding object. +func (client AppsClient) CreateOrUpdateHostNameBinding(ctx context.Context, resourceGroupName string, name string, hostName string, hostNameBinding HostNameBinding) (result HostNameBinding, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateHybridConnection") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateHostNameBinding") defer func() { sc := -1 if result.Response.Response != nil { @@ -2410,36 +2412,35 @@ func (client AppsClient) CreateOrUpdateHybridConnection(ctx context.Context, res 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", "CreateOrUpdateHybridConnection", err.Error()) + return result, validation.NewError("web.AppsClient", "CreateOrUpdateHostNameBinding", err.Error()) } - req, err := client.CreateOrUpdateHybridConnectionPreparer(ctx, resourceGroupName, name, namespaceName, relayName, connectionEnvelope) + req, err := client.CreateOrUpdateHostNameBindingPreparer(ctx, resourceGroupName, name, hostName, hostNameBinding) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHybridConnection", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostNameBinding", nil, "Failure preparing request") return } - resp, err := client.CreateOrUpdateHybridConnectionSender(req) + resp, err := client.CreateOrUpdateHostNameBindingSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHybridConnection", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostNameBinding", resp, "Failure sending request") return } - result, err = client.CreateOrUpdateHybridConnectionResponder(resp) + result, err = client.CreateOrUpdateHostNameBindingResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHybridConnection", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostNameBinding", resp, "Failure responding to request") } return } -// CreateOrUpdateHybridConnectionPreparer prepares the CreateOrUpdateHybridConnection request. -func (client AppsClient) CreateOrUpdateHybridConnectionPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection) (*http.Request, error) { +// CreateOrUpdateHostNameBindingPreparer prepares the CreateOrUpdateHostNameBinding request. +func (client AppsClient) CreateOrUpdateHostNameBindingPreparer(ctx context.Context, resourceGroupName string, name string, hostName string, hostNameBinding HostNameBinding) (*http.Request, error) { pathParameters := map[string]interface{}{ + "hostName": autorest.Encode("path", hostName), "name": autorest.Encode("path", name), - "namespaceName": autorest.Encode("path", namespaceName), - "relayName": autorest.Encode("path", relayName), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -2453,22 +2454,22 @@ func (client AppsClient) CreateOrUpdateHybridConnectionPreparer(ctx context.Cont autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters), - autorest.WithJSON(connectionEnvelope), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}", pathParameters), + autorest.WithJSON(hostNameBinding), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// CreateOrUpdateHybridConnectionSender sends the CreateOrUpdateHybridConnection request. The method will close the +// CreateOrUpdateHostNameBindingSender sends the CreateOrUpdateHostNameBinding request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) CreateOrUpdateHybridConnectionSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) CreateOrUpdateHostNameBindingSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// CreateOrUpdateHybridConnectionResponder handles the response to the CreateOrUpdateHybridConnection request. The method always +// CreateOrUpdateHostNameBindingResponder handles the response to the CreateOrUpdateHostNameBinding request. The method always // closes the http.Response Body. -func (client AppsClient) CreateOrUpdateHybridConnectionResponder(resp *http.Response) (result HybridConnection, err error) { +func (client AppsClient) CreateOrUpdateHostNameBindingResponder(resp *http.Response) (result HostNameBinding, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -2479,17 +2480,17 @@ func (client AppsClient) CreateOrUpdateHybridConnectionResponder(resp *http.Resp return } -// CreateOrUpdateHybridConnectionSlot description for Creates a new Hybrid Connection using a Service Bus relay. +// CreateOrUpdateHostNameBindingSlot description for Creates a hostname binding for an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - the name of the web app. -// namespaceName - the namespace for this hybrid connection. -// relayName - the relay name for this hybrid connection. -// connectionEnvelope - the details of the hybrid connection. -// slot - the name of the slot for the web app. -func (client AppsClient) CreateOrUpdateHybridConnectionSlot(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection, slot string) (result HybridConnection, err error) { +// name - name of the app. +// hostName - hostname in the hostname binding. +// hostNameBinding - binding details. This is the JSON representation of a HostNameBinding object. +// slot - name of the deployment slot. If a slot is not specified, the API will create a binding for the +// production slot. +func (client AppsClient) CreateOrUpdateHostNameBindingSlot(ctx context.Context, resourceGroupName string, name string, hostName string, hostNameBinding HostNameBinding, slot string) (result HostNameBinding, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateHybridConnectionSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateHostNameBindingSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -2503,36 +2504,35 @@ func (client AppsClient) CreateOrUpdateHybridConnectionSlot(ctx context.Context, 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", "CreateOrUpdateHybridConnectionSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "CreateOrUpdateHostNameBindingSlot", err.Error()) } - req, err := client.CreateOrUpdateHybridConnectionSlotPreparer(ctx, resourceGroupName, name, namespaceName, relayName, connectionEnvelope, slot) + req, err := client.CreateOrUpdateHostNameBindingSlotPreparer(ctx, resourceGroupName, name, hostName, hostNameBinding, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHybridConnectionSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostNameBindingSlot", nil, "Failure preparing request") return } - resp, err := client.CreateOrUpdateHybridConnectionSlotSender(req) + resp, err := client.CreateOrUpdateHostNameBindingSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHybridConnectionSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostNameBindingSlot", resp, "Failure sending request") return } - result, err = client.CreateOrUpdateHybridConnectionSlotResponder(resp) + result, err = client.CreateOrUpdateHostNameBindingSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHybridConnectionSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostNameBindingSlot", resp, "Failure responding to request") } return } -// CreateOrUpdateHybridConnectionSlotPreparer prepares the CreateOrUpdateHybridConnectionSlot request. -func (client AppsClient) CreateOrUpdateHybridConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection, slot string) (*http.Request, error) { +// CreateOrUpdateHostNameBindingSlotPreparer prepares the CreateOrUpdateHostNameBindingSlot request. +func (client AppsClient) CreateOrUpdateHostNameBindingSlotPreparer(ctx context.Context, resourceGroupName string, name string, hostName string, hostNameBinding HostNameBinding, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "hostName": autorest.Encode("path", hostName), "name": autorest.Encode("path", name), - "namespaceName": autorest.Encode("path", namespaceName), - "relayName": autorest.Encode("path", relayName), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -2547,22 +2547,22 @@ func (client AppsClient) CreateOrUpdateHybridConnectionSlotPreparer(ctx context. 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}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters), - autorest.WithJSON(connectionEnvelope), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}", pathParameters), + autorest.WithJSON(hostNameBinding), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// CreateOrUpdateHybridConnectionSlotSender sends the CreateOrUpdateHybridConnectionSlot request. The method will close the +// CreateOrUpdateHostNameBindingSlotSender sends the CreateOrUpdateHostNameBindingSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) CreateOrUpdateHybridConnectionSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) CreateOrUpdateHostNameBindingSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// CreateOrUpdateHybridConnectionSlotResponder handles the response to the CreateOrUpdateHybridConnectionSlot request. The method always +// CreateOrUpdateHostNameBindingSlotResponder handles the response to the CreateOrUpdateHostNameBindingSlot request. The method always // closes the http.Response Body. -func (client AppsClient) CreateOrUpdateHybridConnectionSlotResponder(resp *http.Response) (result HybridConnection, err error) { +func (client AppsClient) CreateOrUpdateHostNameBindingSlotResponder(resp *http.Response) (result HostNameBinding, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -2573,16 +2573,16 @@ func (client AppsClient) CreateOrUpdateHybridConnectionSlotResponder(resp *http. return } -// CreateOrUpdatePublicCertificate description for Creates a hostname binding for an app. +// CreateOrUpdateHostSecret description for Add or update a host level secret. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// publicCertificateName - public certificate name. -// publicCertificate - public certificate details. This is the JSON representation of a PublicCertificate -// object. -func (client AppsClient) CreateOrUpdatePublicCertificate(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, publicCertificate PublicCertificate) (result PublicCertificate, err error) { +// name - site name. +// keyType - the type of host key. +// keyName - the name of the key. +// key - the key to create or update +func (client AppsClient) CreateOrUpdateHostSecret(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, key KeyInfo) (result KeyInfo, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdatePublicCertificate") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateHostSecret") defer func() { sc := -1 if result.Response.Response != nil { @@ -2596,37 +2596,38 @@ func (client AppsClient) CreateOrUpdatePublicCertificate(ctx context.Context, re 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", "CreateOrUpdatePublicCertificate", err.Error()) + return result, validation.NewError("web.AppsClient", "CreateOrUpdateHostSecret", err.Error()) } - req, err := client.CreateOrUpdatePublicCertificatePreparer(ctx, resourceGroupName, name, publicCertificateName, publicCertificate) + req, err := client.CreateOrUpdateHostSecretPreparer(ctx, resourceGroupName, name, keyType, keyName, key) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdatePublicCertificate", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostSecret", nil, "Failure preparing request") return } - resp, err := client.CreateOrUpdatePublicCertificateSender(req) + resp, err := client.CreateOrUpdateHostSecretSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdatePublicCertificate", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostSecret", resp, "Failure sending request") return } - result, err = client.CreateOrUpdatePublicCertificateResponder(resp) + result, err = client.CreateOrUpdateHostSecretResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdatePublicCertificate", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostSecret", resp, "Failure responding to request") } return } -// CreateOrUpdatePublicCertificatePreparer prepares the CreateOrUpdatePublicCertificate request. -func (client AppsClient) CreateOrUpdatePublicCertificatePreparer(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, publicCertificate PublicCertificate) (*http.Request, error) { +// CreateOrUpdateHostSecretPreparer prepares the CreateOrUpdateHostSecret request. +func (client AppsClient) CreateOrUpdateHostSecretPreparer(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, key KeyInfo) (*http.Request, error) { pathParameters := map[string]interface{}{ - "name": autorest.Encode("path", name), - "publicCertificateName": autorest.Encode("path", publicCertificateName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "keyName": autorest.Encode("path", keyName), + "keyType": autorest.Encode("path", keyType), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2019-08-01" @@ -2638,44 +2639,43 @@ func (client AppsClient) CreateOrUpdatePublicCertificatePreparer(ctx context.Con autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}", pathParameters), - autorest.WithJSON(publicCertificate), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}", pathParameters), + autorest.WithJSON(key), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// CreateOrUpdatePublicCertificateSender sends the CreateOrUpdatePublicCertificate request. The method will close the +// CreateOrUpdateHostSecretSender sends the CreateOrUpdateHostSecret request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) CreateOrUpdatePublicCertificateSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) CreateOrUpdateHostSecretSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// CreateOrUpdatePublicCertificateResponder handles the response to the CreateOrUpdatePublicCertificate request. The method always +// CreateOrUpdateHostSecretResponder handles the response to the CreateOrUpdateHostSecret request. The method always // closes the http.Response Body. -func (client AppsClient) CreateOrUpdatePublicCertificateResponder(resp *http.Response) (result PublicCertificate, err error) { +func (client AppsClient) CreateOrUpdateHostSecretResponder(resp *http.Response) (result KeyInfo, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// CreateOrUpdatePublicCertificateSlot description for Creates a hostname binding for an app. +// CreateOrUpdateHostSecretSlot description for Add or update a host level secret. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// publicCertificateName - public certificate name. -// publicCertificate - public certificate details. This is the JSON representation of a PublicCertificate -// object. -// slot - name of the deployment slot. If a slot is not specified, the API will create a binding for the -// production slot. -func (client AppsClient) CreateOrUpdatePublicCertificateSlot(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, publicCertificate PublicCertificate, slot string) (result PublicCertificate, err error) { +// name - site name. +// keyType - the type of host key. +// keyName - the name of the key. +// slot - name of the deployment slot. +// key - the key to create or update +func (client AppsClient) CreateOrUpdateHostSecretSlot(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, slot string, key KeyInfo) (result KeyInfo, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdatePublicCertificateSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateHostSecretSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -2689,38 +2689,39 @@ func (client AppsClient) CreateOrUpdatePublicCertificateSlot(ctx context.Context 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", "CreateOrUpdatePublicCertificateSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "CreateOrUpdateHostSecretSlot", err.Error()) } - req, err := client.CreateOrUpdatePublicCertificateSlotPreparer(ctx, resourceGroupName, name, publicCertificateName, publicCertificate, slot) + req, err := client.CreateOrUpdateHostSecretSlotPreparer(ctx, resourceGroupName, name, keyType, keyName, slot, key) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdatePublicCertificateSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostSecretSlot", nil, "Failure preparing request") return } - resp, err := client.CreateOrUpdatePublicCertificateSlotSender(req) + resp, err := client.CreateOrUpdateHostSecretSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdatePublicCertificateSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostSecretSlot", resp, "Failure sending request") return } - result, err = client.CreateOrUpdatePublicCertificateSlotResponder(resp) + result, err = client.CreateOrUpdateHostSecretSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdatePublicCertificateSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostSecretSlot", resp, "Failure responding to request") } return } -// CreateOrUpdatePublicCertificateSlotPreparer prepares the CreateOrUpdatePublicCertificateSlot request. -func (client AppsClient) CreateOrUpdatePublicCertificateSlotPreparer(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, publicCertificate PublicCertificate, slot string) (*http.Request, error) { +// CreateOrUpdateHostSecretSlotPreparer prepares the CreateOrUpdateHostSecretSlot request. +func (client AppsClient) CreateOrUpdateHostSecretSlotPreparer(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, slot string, key KeyInfo) (*http.Request, error) { pathParameters := map[string]interface{}{ - "name": autorest.Encode("path", name), - "publicCertificateName": autorest.Encode("path", publicCertificateName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "keyName": autorest.Encode("path", keyName), + "keyType": autorest.Encode("path", keyType), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2019-08-01" @@ -2732,42 +2733,42 @@ func (client AppsClient) CreateOrUpdatePublicCertificateSlotPreparer(ctx context 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}/publicCertificates/{publicCertificateName}", pathParameters), - autorest.WithJSON(publicCertificate), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}", pathParameters), + autorest.WithJSON(key), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// CreateOrUpdatePublicCertificateSlotSender sends the CreateOrUpdatePublicCertificateSlot request. The method will close the +// CreateOrUpdateHostSecretSlotSender sends the CreateOrUpdateHostSecretSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) CreateOrUpdatePublicCertificateSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) CreateOrUpdateHostSecretSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// CreateOrUpdatePublicCertificateSlotResponder handles the response to the CreateOrUpdatePublicCertificateSlot request. The method always +// CreateOrUpdateHostSecretSlotResponder handles the response to the CreateOrUpdateHostSecretSlot request. The method always // closes the http.Response Body. -func (client AppsClient) CreateOrUpdatePublicCertificateSlotResponder(resp *http.Response) (result PublicCertificate, err error) { +func (client AppsClient) CreateOrUpdateHostSecretSlotResponder(resp *http.Response) (result KeyInfo, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// CreateOrUpdateRelayServiceConnection description for Creates a new hybrid connection configuration (PUT), or updates -// an existing one (PATCH). +// CreateOrUpdateHybridConnection description for Creates a new Hybrid Connection using a Service Bus relay. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// entityName - name of the hybrid connection configuration. -// connectionEnvelope - details of the hybrid connection configuration. -func (client AppsClient) CreateOrUpdateRelayServiceConnection(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity) (result RelayServiceConnectionEntity, err error) { +// name - the name of the web app. +// namespaceName - the namespace for this hybrid connection. +// relayName - the relay name for this hybrid connection. +// connectionEnvelope - the details of the hybrid connection. +func (client AppsClient) CreateOrUpdateHybridConnection(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection) (result HybridConnection, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateRelayServiceConnection") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateHybridConnection") defer func() { sc := -1 if result.Response.Response != nil { @@ -2781,35 +2782,36 @@ func (client AppsClient) CreateOrUpdateRelayServiceConnection(ctx context.Contex 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", "CreateOrUpdateRelayServiceConnection", err.Error()) + return result, validation.NewError("web.AppsClient", "CreateOrUpdateHybridConnection", err.Error()) } - req, err := client.CreateOrUpdateRelayServiceConnectionPreparer(ctx, resourceGroupName, name, entityName, connectionEnvelope) + req, err := client.CreateOrUpdateHybridConnectionPreparer(ctx, resourceGroupName, name, namespaceName, relayName, connectionEnvelope) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateRelayServiceConnection", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHybridConnection", nil, "Failure preparing request") return } - resp, err := client.CreateOrUpdateRelayServiceConnectionSender(req) + resp, err := client.CreateOrUpdateHybridConnectionSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateRelayServiceConnection", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHybridConnection", resp, "Failure sending request") return } - result, err = client.CreateOrUpdateRelayServiceConnectionResponder(resp) + result, err = client.CreateOrUpdateHybridConnectionResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateRelayServiceConnection", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHybridConnection", resp, "Failure responding to request") } return } -// CreateOrUpdateRelayServiceConnectionPreparer prepares the CreateOrUpdateRelayServiceConnection request. -func (client AppsClient) CreateOrUpdateRelayServiceConnectionPreparer(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity) (*http.Request, error) { +// CreateOrUpdateHybridConnectionPreparer prepares the CreateOrUpdateHybridConnection request. +func (client AppsClient) CreateOrUpdateHybridConnectionPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection) (*http.Request, error) { pathParameters := map[string]interface{}{ - "entityName": autorest.Encode("path", entityName), "name": autorest.Encode("path", name), + "namespaceName": autorest.Encode("path", namespaceName), + "relayName": autorest.Encode("path", relayName), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -2823,22 +2825,22 @@ func (client AppsClient) CreateOrUpdateRelayServiceConnectionPreparer(ctx contex autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters), autorest.WithJSON(connectionEnvelope), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// CreateOrUpdateRelayServiceConnectionSender sends the CreateOrUpdateRelayServiceConnection request. The method will close the +// CreateOrUpdateHybridConnectionSender sends the CreateOrUpdateHybridConnection request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) CreateOrUpdateRelayServiceConnectionSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) CreateOrUpdateHybridConnectionSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// CreateOrUpdateRelayServiceConnectionResponder handles the response to the CreateOrUpdateRelayServiceConnection request. The method always +// CreateOrUpdateHybridConnectionResponder handles the response to the CreateOrUpdateHybridConnection request. The method always // closes the http.Response Body. -func (client AppsClient) CreateOrUpdateRelayServiceConnectionResponder(resp *http.Response) (result RelayServiceConnectionEntity, err error) { +func (client AppsClient) CreateOrUpdateHybridConnectionResponder(resp *http.Response) (result HybridConnection, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -2849,18 +2851,17 @@ func (client AppsClient) CreateOrUpdateRelayServiceConnectionResponder(resp *htt return } -// CreateOrUpdateRelayServiceConnectionSlot description for Creates a new hybrid connection configuration (PUT), or -// updates an existing one (PATCH). +// CreateOrUpdateHybridConnectionSlot description for Creates a new Hybrid Connection using a Service Bus relay. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// entityName - name of the hybrid connection configuration. -// connectionEnvelope - details of the hybrid connection configuration. -// slot - name of the deployment slot. If a slot is not specified, the API will create or update a hybrid -// connection for the production slot. -func (client AppsClient) CreateOrUpdateRelayServiceConnectionSlot(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity, slot string) (result RelayServiceConnectionEntity, err error) { +// name - the name of the web app. +// namespaceName - the namespace for this hybrid connection. +// relayName - the relay name for this hybrid connection. +// connectionEnvelope - the details of the hybrid connection. +// slot - the name of the slot for the web app. +func (client AppsClient) CreateOrUpdateHybridConnectionSlot(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection, slot string) (result HybridConnection, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateRelayServiceConnectionSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateHybridConnectionSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -2874,35 +2875,36 @@ func (client AppsClient) CreateOrUpdateRelayServiceConnectionSlot(ctx context.Co 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", "CreateOrUpdateRelayServiceConnectionSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "CreateOrUpdateHybridConnectionSlot", err.Error()) } - req, err := client.CreateOrUpdateRelayServiceConnectionSlotPreparer(ctx, resourceGroupName, name, entityName, connectionEnvelope, slot) + req, err := client.CreateOrUpdateHybridConnectionSlotPreparer(ctx, resourceGroupName, name, namespaceName, relayName, connectionEnvelope, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateRelayServiceConnectionSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHybridConnectionSlot", nil, "Failure preparing request") return } - resp, err := client.CreateOrUpdateRelayServiceConnectionSlotSender(req) + resp, err := client.CreateOrUpdateHybridConnectionSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateRelayServiceConnectionSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHybridConnectionSlot", resp, "Failure sending request") return } - result, err = client.CreateOrUpdateRelayServiceConnectionSlotResponder(resp) + result, err = client.CreateOrUpdateHybridConnectionSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateRelayServiceConnectionSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHybridConnectionSlot", resp, "Failure responding to request") } return } -// CreateOrUpdateRelayServiceConnectionSlotPreparer prepares the CreateOrUpdateRelayServiceConnectionSlot request. -func (client AppsClient) CreateOrUpdateRelayServiceConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity, slot string) (*http.Request, error) { +// CreateOrUpdateHybridConnectionSlotPreparer prepares the CreateOrUpdateHybridConnectionSlot request. +func (client AppsClient) CreateOrUpdateHybridConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "entityName": autorest.Encode("path", entityName), "name": autorest.Encode("path", name), + "namespaceName": autorest.Encode("path", namespaceName), + "relayName": autorest.Encode("path", relayName), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -2917,22 +2919,22 @@ func (client AppsClient) CreateOrUpdateRelayServiceConnectionSlotPreparer(ctx co 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}/hybridconnection/{entityName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters), autorest.WithJSON(connectionEnvelope), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// CreateOrUpdateRelayServiceConnectionSlotSender sends the CreateOrUpdateRelayServiceConnectionSlot request. The method will close the +// CreateOrUpdateHybridConnectionSlotSender sends the CreateOrUpdateHybridConnectionSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) CreateOrUpdateRelayServiceConnectionSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) CreateOrUpdateHybridConnectionSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// CreateOrUpdateRelayServiceConnectionSlotResponder handles the response to the CreateOrUpdateRelayServiceConnectionSlot request. The method always +// CreateOrUpdateHybridConnectionSlotResponder handles the response to the CreateOrUpdateHybridConnectionSlot request. The method always // closes the http.Response Body. -func (client AppsClient) CreateOrUpdateRelayServiceConnectionSlotResponder(resp *http.Response) (result RelayServiceConnectionEntity, err error) { +func (client AppsClient) CreateOrUpdateHybridConnectionSlotResponder(resp *http.Response) (result HybridConnection, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -2943,22 +2945,20 @@ func (client AppsClient) CreateOrUpdateRelayServiceConnectionSlotResponder(resp return } -// CreateOrUpdateSlot description for Creates a new web, mobile, or API app in an existing resource group, or updates -// an existing app. +// CreateOrUpdatePublicCertificate description for Creates a hostname binding for an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - unique name of the app to create or update. To create or update a deployment slot, use the {slot} -// parameter. -// siteEnvelope - a JSON representation of the app properties. See example. -// slot - name of the deployment slot to create or update. By default, this API attempts to create or modify -// the production slot. -func (client AppsClient) CreateOrUpdateSlot(ctx context.Context, resourceGroupName string, name string, siteEnvelope Site, slot string) (result AppsCreateOrUpdateSlotFuture, err error) { +// name - name of the app. +// publicCertificateName - public certificate name. +// publicCertificate - public certificate details. This is the JSON representation of a PublicCertificate +// object. +func (client AppsClient) CreateOrUpdatePublicCertificate(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, publicCertificate PublicCertificate) (result PublicCertificate, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdatePublicCertificate") defer func() { sc := -1 - if result.Response() != nil { - sc = result.Response().StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -2967,47 +2967,38 @@ func (client AppsClient) CreateOrUpdateSlot(ctx context.Context, resourceGroupNa {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: siteEnvelope, - Constraints: []validation.Constraint{{Target: "siteEnvelope.SiteProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.Push", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.Push.PushSettingsProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.Push.PushSettingsProperties.IsPushEnabled", Name: validation.Null, Rule: true, Chain: nil}}}, - }}, - {Target: "siteEnvelope.SiteProperties.SiteConfig.PreWarmedInstanceCount", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.PreWarmedInstanceCount", Name: validation.InclusiveMaximum, Rule: int64(10), Chain: nil}, - {Target: "siteEnvelope.SiteProperties.SiteConfig.PreWarmedInstanceCount", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, - }}, - }}, - {Target: "siteEnvelope.SiteProperties.CloningInfo", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.CloningInfo.SourceWebAppID", Name: validation.Null, Rule: true, Chain: nil}}}, - }}}}}); err != nil { - return result, validation.NewError("web.AppsClient", "CreateOrUpdateSlot", err.Error()) + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "CreateOrUpdatePublicCertificate", err.Error()) } - req, err := client.CreateOrUpdateSlotPreparer(ctx, resourceGroupName, name, siteEnvelope, slot) + req, err := client.CreateOrUpdatePublicCertificatePreparer(ctx, resourceGroupName, name, publicCertificateName, publicCertificate) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdatePublicCertificate", nil, "Failure preparing request") return } - result, err = client.CreateOrUpdateSlotSender(req) + resp, err := client.CreateOrUpdatePublicCertificateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSlot", result.Response(), "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdatePublicCertificate", resp, "Failure sending request") return } + result, err = client.CreateOrUpdatePublicCertificateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdatePublicCertificate", resp, "Failure responding to request") + } + return } -// CreateOrUpdateSlotPreparer prepares the CreateOrUpdateSlot request. -func (client AppsClient) CreateOrUpdateSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteEnvelope Site, slot string) (*http.Request, error) { +// CreateOrUpdatePublicCertificatePreparer prepares the CreateOrUpdatePublicCertificate request. +func (client AppsClient) CreateOrUpdatePublicCertificatePreparer(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, publicCertificate PublicCertificate) (*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), + "name": autorest.Encode("path", name), + "publicCertificateName": autorest.Encode("path", publicCertificateName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2019-08-01" @@ -3019,50 +3010,48 @@ func (client AppsClient) CreateOrUpdateSlotPreparer(ctx context.Context, resourc 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}", pathParameters), - autorest.WithJSON(siteEnvelope), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}", pathParameters), + autorest.WithJSON(publicCertificate), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// CreateOrUpdateSlotSender sends the CreateOrUpdateSlot request. The method will close the +// CreateOrUpdatePublicCertificateSender sends the CreateOrUpdatePublicCertificate request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) CreateOrUpdateSlotSender(req *http.Request) (future AppsCreateOrUpdateSlotFuture, err error) { +func (client AppsClient) CreateOrUpdatePublicCertificateSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) - if err != nil { - return - } - future.Future, err = azure.NewFutureFromResponse(resp) - return + return autorest.SendWithSender(client, req, sd...) } -// CreateOrUpdateSlotResponder handles the response to the CreateOrUpdateSlot request. The method always +// CreateOrUpdatePublicCertificateResponder handles the response to the CreateOrUpdatePublicCertificate request. The method always // closes the http.Response Body. -func (client AppsClient) CreateOrUpdateSlotResponder(resp *http.Response) (result Site, err error) { +func (client AppsClient) CreateOrUpdatePublicCertificateResponder(resp *http.Response) (result PublicCertificate, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// CreateOrUpdateSourceControl description for Updates the source control configuration of an app. +// CreateOrUpdatePublicCertificateSlot description for Creates a hostname binding for an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// siteSourceControl - JSON representation of a SiteSourceControl object. See example. -func (client AppsClient) CreateOrUpdateSourceControl(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl) (result AppsCreateOrUpdateSourceControlFuture, err error) { +// publicCertificateName - public certificate name. +// publicCertificate - public certificate details. This is the JSON representation of a PublicCertificate +// object. +// slot - name of the deployment slot. If a slot is not specified, the API will create a binding for the +// production slot. +func (client AppsClient) CreateOrUpdatePublicCertificateSlot(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, publicCertificate PublicCertificate, slot string) (result PublicCertificate, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateSourceControl") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdatePublicCertificateSlot") defer func() { sc := -1 - if result.Response() != nil { - sc = result.Response().StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -3072,30 +3061,38 @@ func (client AppsClient) CreateOrUpdateSourceControl(ctx context.Context, resour 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", "CreateOrUpdateSourceControl", err.Error()) + return result, validation.NewError("web.AppsClient", "CreateOrUpdatePublicCertificateSlot", err.Error()) } - req, err := client.CreateOrUpdateSourceControlPreparer(ctx, resourceGroupName, name, siteSourceControl) + req, err := client.CreateOrUpdatePublicCertificateSlotPreparer(ctx, resourceGroupName, name, publicCertificateName, publicCertificate, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSourceControl", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdatePublicCertificateSlot", nil, "Failure preparing request") return } - result, err = client.CreateOrUpdateSourceControlSender(req) + resp, err := client.CreateOrUpdatePublicCertificateSlotSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSourceControl", result.Response(), "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdatePublicCertificateSlot", resp, "Failure sending request") return } + result, err = client.CreateOrUpdatePublicCertificateSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdatePublicCertificateSlot", resp, "Failure responding to request") + } + return } -// CreateOrUpdateSourceControlPreparer prepares the CreateOrUpdateSourceControl request. -func (client AppsClient) CreateOrUpdateSourceControlPreparer(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl) (*http.Request, error) { +// CreateOrUpdatePublicCertificateSlotPreparer prepares the CreateOrUpdatePublicCertificateSlot request. +func (client AppsClient) CreateOrUpdatePublicCertificateSlotPreparer(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, publicCertificate PublicCertificate, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "name": autorest.Encode("path", name), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "name": autorest.Encode("path", name), + "publicCertificateName": autorest.Encode("path", publicCertificateName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2019-08-01" @@ -3107,52 +3104,46 @@ func (client AppsClient) CreateOrUpdateSourceControlPreparer(ctx context.Context autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web", pathParameters), - autorest.WithJSON(siteSourceControl), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}", pathParameters), + autorest.WithJSON(publicCertificate), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// CreateOrUpdateSourceControlSender sends the CreateOrUpdateSourceControl request. The method will close the +// CreateOrUpdatePublicCertificateSlotSender sends the CreateOrUpdatePublicCertificateSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) CreateOrUpdateSourceControlSender(req *http.Request) (future AppsCreateOrUpdateSourceControlFuture, err error) { +func (client AppsClient) CreateOrUpdatePublicCertificateSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) - if err != nil { - return - } - future.Future, err = azure.NewFutureFromResponse(resp) - return + return autorest.SendWithSender(client, req, sd...) } -// CreateOrUpdateSourceControlResponder handles the response to the CreateOrUpdateSourceControl request. The method always +// CreateOrUpdatePublicCertificateSlotResponder handles the response to the CreateOrUpdatePublicCertificateSlot request. The method always // closes the http.Response Body. -func (client AppsClient) CreateOrUpdateSourceControlResponder(resp *http.Response) (result SiteSourceControl, err error) { +func (client AppsClient) CreateOrUpdatePublicCertificateSlotResponder(resp *http.Response) (result PublicCertificate, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// CreateOrUpdateSourceControlSlot description for Updates the source control configuration of an app. +// CreateOrUpdateRelayServiceConnection description for Creates a new hybrid connection configuration (PUT), or updates +// an existing one (PATCH). // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// siteSourceControl - JSON representation of a SiteSourceControl object. See example. -// slot - name of the deployment slot. If a slot is not specified, the API will update the source control -// configuration for the production slot. -func (client AppsClient) CreateOrUpdateSourceControlSlot(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl, slot string) (result AppsCreateOrUpdateSourceControlSlotFuture, err error) { +// entityName - name of the hybrid connection configuration. +// connectionEnvelope - details of the hybrid connection configuration. +func (client AppsClient) CreateOrUpdateRelayServiceConnection(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity) (result RelayServiceConnectionEntity, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateSourceControlSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateRelayServiceConnection") defer func() { sc := -1 - if result.Response() != nil { - sc = result.Response().StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -3162,30 +3153,36 @@ func (client AppsClient) CreateOrUpdateSourceControlSlot(ctx context.Context, re 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", "CreateOrUpdateSourceControlSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "CreateOrUpdateRelayServiceConnection", err.Error()) } - req, err := client.CreateOrUpdateSourceControlSlotPreparer(ctx, resourceGroupName, name, siteSourceControl, slot) + req, err := client.CreateOrUpdateRelayServiceConnectionPreparer(ctx, resourceGroupName, name, entityName, connectionEnvelope) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSourceControlSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateRelayServiceConnection", nil, "Failure preparing request") return } - result, err = client.CreateOrUpdateSourceControlSlotSender(req) + resp, err := client.CreateOrUpdateRelayServiceConnectionSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSourceControlSlot", result.Response(), "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateRelayServiceConnection", resp, "Failure sending request") return } + result, err = client.CreateOrUpdateRelayServiceConnectionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateRelayServiceConnection", resp, "Failure responding to request") + } + return } -// CreateOrUpdateSourceControlSlotPreparer prepares the CreateOrUpdateSourceControlSlot request. -func (client AppsClient) CreateOrUpdateSourceControlSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl, slot string) (*http.Request, error) { +// CreateOrUpdateRelayServiceConnectionPreparer prepares the CreateOrUpdateRelayServiceConnection request. +func (client AppsClient) CreateOrUpdateRelayServiceConnectionPreparer(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity) (*http.Request, error) { pathParameters := map[string]interface{}{ + "entityName": autorest.Encode("path", entityName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -3198,49 +3195,44 @@ func (client AppsClient) CreateOrUpdateSourceControlSlotPreparer(ctx context.Con 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}/sourcecontrols/web", pathParameters), - autorest.WithJSON(siteSourceControl), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}", pathParameters), + autorest.WithJSON(connectionEnvelope), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// CreateOrUpdateSourceControlSlotSender sends the CreateOrUpdateSourceControlSlot request. The method will close the +// CreateOrUpdateRelayServiceConnectionSender sends the CreateOrUpdateRelayServiceConnection request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) CreateOrUpdateSourceControlSlotSender(req *http.Request) (future AppsCreateOrUpdateSourceControlSlotFuture, err error) { +func (client AppsClient) CreateOrUpdateRelayServiceConnectionSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) - if err != nil { - return - } - future.Future, err = azure.NewFutureFromResponse(resp) - return + return autorest.SendWithSender(client, req, sd...) } -// CreateOrUpdateSourceControlSlotResponder handles the response to the CreateOrUpdateSourceControlSlot request. The method always +// CreateOrUpdateRelayServiceConnectionResponder handles the response to the CreateOrUpdateRelayServiceConnection request. The method always // closes the http.Response Body. -func (client AppsClient) CreateOrUpdateSourceControlSlotResponder(resp *http.Response) (result SiteSourceControl, err error) { +func (client AppsClient) CreateOrUpdateRelayServiceConnectionResponder(resp *http.Response) (result RelayServiceConnectionEntity, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// CreateOrUpdateSwiftVirtualNetworkConnection description for Integrates this Web App with a Virtual Network. This -// requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has -// already been delegated, and is not -// in use by another App Service Plan other than the one this App is in. +// CreateOrUpdateRelayServiceConnectionSlot description for Creates a new hybrid connection configuration (PUT), or +// updates an existing one (PATCH). // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// connectionEnvelope - properties of the Virtual Network connection. See example. -func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnection(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork) (result SwiftVirtualNetwork, err error) { +// entityName - name of the hybrid connection configuration. +// connectionEnvelope - details of the hybrid connection configuration. +// slot - name of the deployment slot. If a slot is not specified, the API will create or update a hybrid +// connection for the production slot. +func (client AppsClient) CreateOrUpdateRelayServiceConnectionSlot(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity, slot string) (result RelayServiceConnectionEntity, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateSwiftVirtualNetworkConnection") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateRelayServiceConnectionSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -3254,35 +3246,37 @@ func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnection(ctx context 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", "CreateOrUpdateSwiftVirtualNetworkConnection", err.Error()) + return result, validation.NewError("web.AppsClient", "CreateOrUpdateRelayServiceConnectionSlot", err.Error()) } - req, err := client.CreateOrUpdateSwiftVirtualNetworkConnectionPreparer(ctx, resourceGroupName, name, connectionEnvelope) + req, err := client.CreateOrUpdateRelayServiceConnectionSlotPreparer(ctx, resourceGroupName, name, entityName, connectionEnvelope, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnection", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateRelayServiceConnectionSlot", nil, "Failure preparing request") return } - resp, err := client.CreateOrUpdateSwiftVirtualNetworkConnectionSender(req) + resp, err := client.CreateOrUpdateRelayServiceConnectionSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnection", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateRelayServiceConnectionSlot", resp, "Failure sending request") return } - result, err = client.CreateOrUpdateSwiftVirtualNetworkConnectionResponder(resp) + result, err = client.CreateOrUpdateRelayServiceConnectionSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnection", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateRelayServiceConnectionSlot", resp, "Failure responding to request") } return } -// CreateOrUpdateSwiftVirtualNetworkConnectionPreparer prepares the CreateOrUpdateSwiftVirtualNetworkConnection request. -func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionPreparer(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork) (*http.Request, error) { +// CreateOrUpdateRelayServiceConnectionSlotPreparer prepares the CreateOrUpdateRelayServiceConnectionSlot request. +func (client AppsClient) CreateOrUpdateRelayServiceConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "entityName": autorest.Encode("path", entityName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -3295,22 +3289,22 @@ func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionPreparer(ctx autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}", pathParameters), autorest.WithJSON(connectionEnvelope), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// CreateOrUpdateSwiftVirtualNetworkConnectionSender sends the CreateOrUpdateSwiftVirtualNetworkConnection request. The method will close the +// CreateOrUpdateRelayServiceConnectionSlotSender sends the CreateOrUpdateRelayServiceConnectionSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) CreateOrUpdateRelayServiceConnectionSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// CreateOrUpdateSwiftVirtualNetworkConnectionResponder handles the response to the CreateOrUpdateSwiftVirtualNetworkConnection request. The method always +// CreateOrUpdateRelayServiceConnectionSlotResponder handles the response to the CreateOrUpdateRelayServiceConnectionSlot request. The method always // closes the http.Response Body. -func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionResponder(resp *http.Response) (result SwiftVirtualNetwork, err error) { +func (client AppsClient) CreateOrUpdateRelayServiceConnectionSlotResponder(resp *http.Response) (result RelayServiceConnectionEntity, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -3321,23 +3315,22 @@ func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionResponder(re return } -// CreateOrUpdateSwiftVirtualNetworkConnectionSlot description for Integrates this Web App with a Virtual Network. This -// requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has -// already been delegated, and is not -// in use by another App Service Plan other than the one this App is in. +// CreateOrUpdateSlot description for Creates a new web, mobile, or API app in an existing resource group, or updates +// an existing app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// connectionEnvelope - properties of the Virtual Network connection. See example. -// slot - name of the deployment slot. If a slot is not specified, the API will add or update connections for +// name - unique name of the app to create or update. To create or update a deployment slot, use the {slot} +// parameter. +// siteEnvelope - a JSON representation of the app properties. See example. +// slot - name of the deployment slot to create or update. By default, this API attempts to create or modify // the production slot. -func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionSlot(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork, slot string) (result SwiftVirtualNetwork, err error) { +func (client AppsClient) CreateOrUpdateSlot(ctx context.Context, resourceGroupName string, name string, siteEnvelope Site, slot string) (result AppsCreateOrUpdateSlotFuture, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateSwiftVirtualNetworkConnectionSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateSlot") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.Response() != nil { + sc = result.Response().StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -3346,33 +3339,42 @@ func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionSlot(ctx con {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", "CreateOrUpdateSwiftVirtualNetworkConnectionSlot", err.Error()) + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}, + {TargetValue: siteEnvelope, + Constraints: []validation.Constraint{{Target: "siteEnvelope.SiteProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.Push", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.Push.PushSettingsProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.Push.PushSettingsProperties.IsPushEnabled", Name: validation.Null, Rule: true, Chain: nil}}}, + }}, + {Target: "siteEnvelope.SiteProperties.SiteConfig.PreWarmedInstanceCount", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.PreWarmedInstanceCount", Name: validation.InclusiveMaximum, Rule: int64(10), Chain: nil}, + {Target: "siteEnvelope.SiteProperties.SiteConfig.PreWarmedInstanceCount", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, + }}, + }}, + {Target: "siteEnvelope.SiteProperties.CloningInfo", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.CloningInfo.SourceWebAppID", Name: validation.Null, Rule: true, Chain: nil}}}, + }}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "CreateOrUpdateSlot", err.Error()) } - req, err := client.CreateOrUpdateSwiftVirtualNetworkConnectionSlotPreparer(ctx, resourceGroupName, name, connectionEnvelope, slot) + req, err := client.CreateOrUpdateSlotPreparer(ctx, resourceGroupName, name, siteEnvelope, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnectionSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSlot", nil, "Failure preparing request") return } - resp, err := client.CreateOrUpdateSwiftVirtualNetworkConnectionSlotSender(req) + result, err = client.CreateOrUpdateSlotSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnectionSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSlot", result.Response(), "Failure sending request") return } - result, err = client.CreateOrUpdateSwiftVirtualNetworkConnectionSlotResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnectionSlot", resp, "Failure responding to request") - } - return } -// CreateOrUpdateSwiftVirtualNetworkConnectionSlotPreparer prepares the CreateOrUpdateSwiftVirtualNetworkConnectionSlot request. -func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork, slot string) (*http.Request, error) { +// CreateOrUpdateSlotPreparer prepares the CreateOrUpdateSlot request. +func (client AppsClient) CreateOrUpdateSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteEnvelope Site, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -3389,46 +3391,50 @@ func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionSlotPreparer 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}/networkConfig/virtualNetwork", pathParameters), - autorest.WithJSON(connectionEnvelope), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}", pathParameters), + autorest.WithJSON(siteEnvelope), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// CreateOrUpdateSwiftVirtualNetworkConnectionSlotSender sends the CreateOrUpdateSwiftVirtualNetworkConnectionSlot request. The method will close the +// CreateOrUpdateSlotSender sends the CreateOrUpdateSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) CreateOrUpdateSlotSender(req *http.Request) (future AppsCreateOrUpdateSlotFuture, err error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return } -// CreateOrUpdateSwiftVirtualNetworkConnectionSlotResponder handles the response to the CreateOrUpdateSwiftVirtualNetworkConnectionSlot request. The method always +// CreateOrUpdateSlotResponder handles the response to the CreateOrUpdateSlot request. The method always // closes the http.Response Body. -func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionSlotResponder(resp *http.Response) (result SwiftVirtualNetwork, err error) { +func (client AppsClient) CreateOrUpdateSlotResponder(resp *http.Response) (result Site, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// CreateOrUpdateVnetConnection description for Adds a Virtual Network connection to an app or slot (PUT) or updates -// the connection properties (PATCH). +// CreateOrUpdateSourceControl description for Updates the source control configuration of an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// vnetName - name of an existing Virtual Network. -// connectionEnvelope - properties of the Virtual Network connection. See example. -func (client AppsClient) CreateOrUpdateVnetConnection(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfo) (result VnetInfo, err error) { +// siteSourceControl - JSON representation of a SiteSourceControl object. See example. +func (client AppsClient) CreateOrUpdateSourceControl(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl) (result AppsCreateOrUpdateSourceControlFuture, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateVnetConnection") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateSourceControl") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.Response() != nil { + sc = result.Response().StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -3438,37 +3444,30 @@ func (client AppsClient) CreateOrUpdateVnetConnection(ctx context.Context, resou 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", "CreateOrUpdateVnetConnection", err.Error()) + return result, validation.NewError("web.AppsClient", "CreateOrUpdateSourceControl", err.Error()) } - req, err := client.CreateOrUpdateVnetConnectionPreparer(ctx, resourceGroupName, name, vnetName, connectionEnvelope) + req, err := client.CreateOrUpdateSourceControlPreparer(ctx, resourceGroupName, name, siteSourceControl) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnection", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSourceControl", nil, "Failure preparing request") return } - resp, err := client.CreateOrUpdateVnetConnectionSender(req) + result, err = client.CreateOrUpdateSourceControlSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnection", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSourceControl", result.Response(), "Failure sending request") return } - result, err = client.CreateOrUpdateVnetConnectionResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnection", resp, "Failure responding to request") - } - return } -// CreateOrUpdateVnetConnectionPreparer prepares the CreateOrUpdateVnetConnection request. -func (client AppsClient) CreateOrUpdateVnetConnectionPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfo) (*http.Request, error) { +// CreateOrUpdateSourceControlPreparer prepares the CreateOrUpdateSourceControl request. +func (client AppsClient) CreateOrUpdateSourceControlPreparer(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vnetName": autorest.Encode("path", vnetName), } const APIVersion = "2019-08-01" @@ -3480,47 +3479,52 @@ func (client AppsClient) CreateOrUpdateVnetConnectionPreparer(ctx context.Contex autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}", pathParameters), - autorest.WithJSON(connectionEnvelope), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web", pathParameters), + autorest.WithJSON(siteSourceControl), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// CreateOrUpdateVnetConnectionSender sends the CreateOrUpdateVnetConnection request. The method will close the +// CreateOrUpdateSourceControlSender sends the CreateOrUpdateSourceControl request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) CreateOrUpdateVnetConnectionSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) CreateOrUpdateSourceControlSender(req *http.Request) (future AppsCreateOrUpdateSourceControlFuture, err error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return } -// CreateOrUpdateVnetConnectionResponder handles the response to the CreateOrUpdateVnetConnection request. The method always +// CreateOrUpdateSourceControlResponder handles the response to the CreateOrUpdateSourceControl request. The method always // closes the http.Response Body. -func (client AppsClient) CreateOrUpdateVnetConnectionResponder(resp *http.Response) (result VnetInfo, err error) { +func (client AppsClient) CreateOrUpdateSourceControlResponder(resp *http.Response) (result SiteSourceControl, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// CreateOrUpdateVnetConnectionGateway description for Adds a gateway to a connected Virtual Network (PUT) or updates -// it (PATCH). +// CreateOrUpdateSourceControlSlot description for Updates the source control configuration of an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// vnetName - name of the Virtual Network. -// gatewayName - name of the gateway. Currently, the only supported string is "primary". -// connectionEnvelope - the properties to update this gateway with. -func (client AppsClient) CreateOrUpdateVnetConnectionGateway(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway) (result VnetGateway, err error) { +// siteSourceControl - JSON representation of a SiteSourceControl object. See example. +// slot - name of the deployment slot. If a slot is not specified, the API will update the source control +// configuration for the production slot. +func (client AppsClient) CreateOrUpdateSourceControlSlot(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl, slot string) (result AppsCreateOrUpdateSourceControlSlotFuture, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateVnetConnectionGateway") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateSourceControlSlot") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.Response() != nil { + sc = result.Response().StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -3529,42 +3533,32 @@ func (client AppsClient) CreateOrUpdateVnetConnectionGateway(ctx context.Context {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: connectionEnvelope, - Constraints: []validation.Constraint{{Target: "connectionEnvelope.VnetGatewayProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "connectionEnvelope.VnetGatewayProperties.VpnPackageURI", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { - return result, validation.NewError("web.AppsClient", "CreateOrUpdateVnetConnectionGateway", err.Error()) + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "CreateOrUpdateSourceControlSlot", err.Error()) } - req, err := client.CreateOrUpdateVnetConnectionGatewayPreparer(ctx, resourceGroupName, name, vnetName, gatewayName, connectionEnvelope) + req, err := client.CreateOrUpdateSourceControlSlotPreparer(ctx, resourceGroupName, name, siteSourceControl, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionGateway", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSourceControlSlot", nil, "Failure preparing request") return } - resp, err := client.CreateOrUpdateVnetConnectionGatewaySender(req) + result, err = client.CreateOrUpdateSourceControlSlotSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionGateway", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSourceControlSlot", result.Response(), "Failure sending request") return } - result, err = client.CreateOrUpdateVnetConnectionGatewayResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionGateway", resp, "Failure responding to request") - } - return } -// CreateOrUpdateVnetConnectionGatewayPreparer prepares the CreateOrUpdateVnetConnectionGateway request. -func (client AppsClient) CreateOrUpdateVnetConnectionGatewayPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway) (*http.Request, error) { +// CreateOrUpdateSourceControlSlotPreparer prepares the CreateOrUpdateSourceControlSlot request. +func (client AppsClient) CreateOrUpdateSourceControlSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "gatewayName": autorest.Encode("path", gatewayName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vnetName": autorest.Encode("path", vnetName), } const APIVersion = "2019-08-01" @@ -3576,45 +3570,49 @@ func (client AppsClient) CreateOrUpdateVnetConnectionGatewayPreparer(ctx context autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}", pathParameters), - autorest.WithJSON(connectionEnvelope), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web", pathParameters), + autorest.WithJSON(siteSourceControl), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// CreateOrUpdateVnetConnectionGatewaySender sends the CreateOrUpdateVnetConnectionGateway request. The method will close the +// CreateOrUpdateSourceControlSlotSender sends the CreateOrUpdateSourceControlSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) CreateOrUpdateVnetConnectionGatewaySender(req *http.Request) (*http.Response, error) { +func (client AppsClient) CreateOrUpdateSourceControlSlotSender(req *http.Request) (future AppsCreateOrUpdateSourceControlSlotFuture, err error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return } -// CreateOrUpdateVnetConnectionGatewayResponder handles the response to the CreateOrUpdateVnetConnectionGateway request. The method always +// CreateOrUpdateSourceControlSlotResponder handles the response to the CreateOrUpdateSourceControlSlot request. The method always // closes the http.Response Body. -func (client AppsClient) CreateOrUpdateVnetConnectionGatewayResponder(resp *http.Response) (result VnetGateway, err error) { +func (client AppsClient) CreateOrUpdateSourceControlSlotResponder(resp *http.Response) (result SiteSourceControl, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// CreateOrUpdateVnetConnectionGatewaySlot description for Adds a gateway to a connected Virtual Network (PUT) or -// updates it (PATCH). +// CreateOrUpdateSwiftVirtualNetworkConnection description for Integrates this Web App with a Virtual Network. This +// requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has +// already been delegated, and is not +// in use by another App Service Plan other than the one this App is in. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// vnetName - name of the Virtual Network. -// gatewayName - name of the gateway. Currently, the only supported string is "primary". -// connectionEnvelope - the properties to update this gateway with. -// slot - name of the deployment slot. If a slot is not specified, the API will add or update a gateway for the -// production slot's Virtual Network. -func (client AppsClient) CreateOrUpdateVnetConnectionGatewaySlot(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway, slot string) (result VnetGateway, err error) { +// connectionEnvelope - properties of the Virtual Network connection. See example. +func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnection(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork) (result SwiftVirtualNetwork, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateVnetConnectionGatewaySlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateSwiftVirtualNetworkConnection") defer func() { sc := -1 if result.Response.Response != nil { @@ -3627,43 +3625,37 @@ func (client AppsClient) CreateOrUpdateVnetConnectionGatewaySlot(ctx context.Con {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: connectionEnvelope, - Constraints: []validation.Constraint{{Target: "connectionEnvelope.VnetGatewayProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "connectionEnvelope.VnetGatewayProperties.VpnPackageURI", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { - return result, validation.NewError("web.AppsClient", "CreateOrUpdateVnetConnectionGatewaySlot", err.Error()) + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnection", err.Error()) } - req, err := client.CreateOrUpdateVnetConnectionGatewaySlotPreparer(ctx, resourceGroupName, name, vnetName, gatewayName, connectionEnvelope, slot) + req, err := client.CreateOrUpdateSwiftVirtualNetworkConnectionPreparer(ctx, resourceGroupName, name, connectionEnvelope) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionGatewaySlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnection", nil, "Failure preparing request") return } - resp, err := client.CreateOrUpdateVnetConnectionGatewaySlotSender(req) + resp, err := client.CreateOrUpdateSwiftVirtualNetworkConnectionSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionGatewaySlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnection", resp, "Failure sending request") return } - result, err = client.CreateOrUpdateVnetConnectionGatewaySlotResponder(resp) + result, err = client.CreateOrUpdateSwiftVirtualNetworkConnectionResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionGatewaySlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnection", resp, "Failure responding to request") } return } -// CreateOrUpdateVnetConnectionGatewaySlotPreparer prepares the CreateOrUpdateVnetConnectionGatewaySlot request. -func (client AppsClient) CreateOrUpdateVnetConnectionGatewaySlotPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway, slot string) (*http.Request, error) { +// CreateOrUpdateSwiftVirtualNetworkConnectionPreparer prepares the CreateOrUpdateSwiftVirtualNetworkConnection request. +func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionPreparer(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork) (*http.Request, error) { pathParameters := map[string]interface{}{ - "gatewayName": autorest.Encode("path", gatewayName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vnetName": autorest.Encode("path", vnetName), } const APIVersion = "2019-08-01" @@ -3675,22 +3667,22 @@ func (client AppsClient) CreateOrUpdateVnetConnectionGatewaySlotPreparer(ctx con 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}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork", pathParameters), autorest.WithJSON(connectionEnvelope), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// CreateOrUpdateVnetConnectionGatewaySlotSender sends the CreateOrUpdateVnetConnectionGatewaySlot request. The method will close the +// CreateOrUpdateSwiftVirtualNetworkConnectionSender sends the CreateOrUpdateSwiftVirtualNetworkConnection request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) CreateOrUpdateVnetConnectionGatewaySlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// CreateOrUpdateVnetConnectionGatewaySlotResponder handles the response to the CreateOrUpdateVnetConnectionGatewaySlot request. The method always +// CreateOrUpdateSwiftVirtualNetworkConnectionResponder handles the response to the CreateOrUpdateSwiftVirtualNetworkConnection request. The method always // closes the http.Response Body. -func (client AppsClient) CreateOrUpdateVnetConnectionGatewaySlotResponder(resp *http.Response) (result VnetGateway, err error) { +func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionResponder(resp *http.Response) (result SwiftVirtualNetwork, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -3701,18 +3693,19 @@ func (client AppsClient) CreateOrUpdateVnetConnectionGatewaySlotResponder(resp * return } -// CreateOrUpdateVnetConnectionSlot description for Adds a Virtual Network connection to an app or slot (PUT) or -// updates the connection properties (PATCH). +// CreateOrUpdateSwiftVirtualNetworkConnectionSlot description for Integrates this Web App with a Virtual Network. This +// requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has +// already been delegated, and is not +// in use by another App Service Plan other than the one this App is in. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// vnetName - name of an existing Virtual Network. // connectionEnvelope - properties of the Virtual Network connection. See example. // slot - name of the deployment slot. If a slot is not specified, the API will add or update connections for // the production slot. -func (client AppsClient) CreateOrUpdateVnetConnectionSlot(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfo, slot string) (result VnetInfo, err error) { +func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionSlot(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork, slot string) (result SwiftVirtualNetwork, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateVnetConnectionSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateSwiftVirtualNetworkConnectionSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -3726,38 +3719,37 @@ func (client AppsClient) CreateOrUpdateVnetConnectionSlot(ctx context.Context, r 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", "CreateOrUpdateVnetConnectionSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnectionSlot", err.Error()) } - req, err := client.CreateOrUpdateVnetConnectionSlotPreparer(ctx, resourceGroupName, name, vnetName, connectionEnvelope, slot) + req, err := client.CreateOrUpdateSwiftVirtualNetworkConnectionSlotPreparer(ctx, resourceGroupName, name, connectionEnvelope, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnectionSlot", nil, "Failure preparing request") return } - resp, err := client.CreateOrUpdateVnetConnectionSlotSender(req) + resp, err := client.CreateOrUpdateSwiftVirtualNetworkConnectionSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnectionSlot", resp, "Failure sending request") return } - result, err = client.CreateOrUpdateVnetConnectionSlotResponder(resp) + result, err = client.CreateOrUpdateSwiftVirtualNetworkConnectionSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnectionSlot", resp, "Failure responding to request") } return } -// CreateOrUpdateVnetConnectionSlotPreparer prepares the CreateOrUpdateVnetConnectionSlot request. -func (client AppsClient) CreateOrUpdateVnetConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfo, slot string) (*http.Request, error) { +// CreateOrUpdateSwiftVirtualNetworkConnectionSlotPreparer prepares the CreateOrUpdateSwiftVirtualNetworkConnectionSlot request. +func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork, 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), - "vnetName": autorest.Encode("path", vnetName), } const APIVersion = "2019-08-01" @@ -3769,22 +3761,22 @@ func (client AppsClient) CreateOrUpdateVnetConnectionSlotPreparer(ctx context.Co 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}/virtualNetworkConnections/{vnetName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork", pathParameters), autorest.WithJSON(connectionEnvelope), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// CreateOrUpdateVnetConnectionSlotSender sends the CreateOrUpdateVnetConnectionSlot request. The method will close the +// CreateOrUpdateSwiftVirtualNetworkConnectionSlotSender sends the CreateOrUpdateSwiftVirtualNetworkConnectionSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) CreateOrUpdateVnetConnectionSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// CreateOrUpdateVnetConnectionSlotResponder handles the response to the CreateOrUpdateVnetConnectionSlot request. The method always +// CreateOrUpdateSwiftVirtualNetworkConnectionSlotResponder handles the response to the CreateOrUpdateSwiftVirtualNetworkConnectionSlot request. The method always // closes the http.Response Body. -func (client AppsClient) CreateOrUpdateVnetConnectionSlotResponder(resp *http.Response) (result VnetInfo, err error) { +func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionSlotResponder(resp *http.Response) (result SwiftVirtualNetwork, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -3795,20 +3787,20 @@ func (client AppsClient) CreateOrUpdateVnetConnectionSlotResponder(resp *http.Re return } -// Delete description for Deletes a web, mobile, or API app, or one of the deployment slots. +// CreateOrUpdateVnetConnection description for Adds a Virtual Network connection to an app or slot (PUT) or updates +// the connection properties (PATCH). // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app to delete. -// deleteMetrics - if true, web app metrics are also deleted. -// deleteEmptyServerFarm - specify false if you want to keep empty App Service plan. By default, empty App -// Service plan is deleted. -func (client AppsClient) Delete(ctx context.Context, resourceGroupName string, name string, deleteMetrics *bool, deleteEmptyServerFarm *bool) (result autorest.Response, err error) { +// name - name of the app. +// vnetName - name of an existing Virtual Network. +// connectionEnvelope - properties of the Virtual Network connection. See example. +func (client AppsClient) CreateOrUpdateVnetConnection(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfo) (result VnetInfo, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.Delete") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateVnetConnection") defer func() { sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -3818,88 +3810,89 @@ func (client AppsClient) Delete(ctx context.Context, resourceGroupName string, n 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", "Delete", err.Error()) + return result, validation.NewError("web.AppsClient", "CreateOrUpdateVnetConnection", err.Error()) } - req, err := client.DeletePreparer(ctx, resourceGroupName, name, deleteMetrics, deleteEmptyServerFarm) + req, err := client.CreateOrUpdateVnetConnectionPreparer(ctx, resourceGroupName, name, vnetName, connectionEnvelope) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "Delete", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnection", nil, "Failure preparing request") return } - resp, err := client.DeleteSender(req) + resp, err := client.CreateOrUpdateVnetConnectionSender(req) if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "Delete", resp, "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnection", resp, "Failure sending request") return } - result, err = client.DeleteResponder(resp) + result, err = client.CreateOrUpdateVnetConnectionResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "Delete", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnection", resp, "Failure responding to request") } return } -// DeletePreparer prepares the Delete request. -func (client AppsClient) DeletePreparer(ctx context.Context, resourceGroupName string, name string, deleteMetrics *bool, deleteEmptyServerFarm *bool) (*http.Request, error) { +// CreateOrUpdateVnetConnectionPreparer prepares the CreateOrUpdateVnetConnection request. +func (client AppsClient) CreateOrUpdateVnetConnectionPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfo) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vnetName": autorest.Encode("path", vnetName), } const APIVersion = "2019-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } - if deleteMetrics != nil { - queryParameters["deleteMetrics"] = autorest.Encode("query", *deleteMetrics) - } - if deleteEmptyServerFarm != nil { - queryParameters["deleteEmptyServerFarm"] = autorest.Encode("query", *deleteEmptyServerFarm) - } preparer := autorest.CreatePreparer( - autorest.AsDelete(), + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}", pathParameters), + autorest.WithJSON(connectionEnvelope), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteSender sends the Delete request. The method will close the +// CreateOrUpdateVnetConnectionSender sends the CreateOrUpdateVnetConnection request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) CreateOrUpdateVnetConnectionSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteResponder handles the response to the Delete request. The method always +// CreateOrUpdateVnetConnectionResponder handles the response to the CreateOrUpdateVnetConnection request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) CreateOrUpdateVnetConnectionResponder(resp *http.Response) (result VnetInfo, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) - result.Response = resp + result.Response = autorest.Response{Response: resp} return } -// DeleteBackup description for Deletes a backup of an app by its ID. +// CreateOrUpdateVnetConnectionGateway description for Adds a gateway to a connected Virtual Network (PUT) or updates +// it (PATCH). // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// backupID - ID of the backup. -func (client AppsClient) DeleteBackup(ctx context.Context, resourceGroupName string, name string, backupID string) (result autorest.Response, err error) { +// vnetName - name of the Virtual Network. +// gatewayName - name of the gateway. Currently, the only supported string is "primary". +// connectionEnvelope - the properties to update this gateway with. +func (client AppsClient) CreateOrUpdateVnetConnectionGateway(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway) (result VnetGateway, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteBackup") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateVnetConnectionGateway") defer func() { sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -3908,38 +3901,42 @@ func (client AppsClient) DeleteBackup(ctx context.Context, resourceGroupName str {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", "DeleteBackup", err.Error()) + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}, + {TargetValue: connectionEnvelope, + Constraints: []validation.Constraint{{Target: "connectionEnvelope.VnetGatewayProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "connectionEnvelope.VnetGatewayProperties.VpnPackageURI", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "CreateOrUpdateVnetConnectionGateway", err.Error()) } - req, err := client.DeleteBackupPreparer(ctx, resourceGroupName, name, backupID) + req, err := client.CreateOrUpdateVnetConnectionGatewayPreparer(ctx, resourceGroupName, name, vnetName, gatewayName, connectionEnvelope) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackup", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionGateway", nil, "Failure preparing request") return } - resp, err := client.DeleteBackupSender(req) + resp, err := client.CreateOrUpdateVnetConnectionGatewaySender(req) if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackup", resp, "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionGateway", resp, "Failure sending request") return } - result, err = client.DeleteBackupResponder(resp) + result, err = client.CreateOrUpdateVnetConnectionGatewayResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackup", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionGateway", resp, "Failure responding to request") } return } -// DeleteBackupPreparer prepares the DeleteBackup request. -func (client AppsClient) DeleteBackupPreparer(ctx context.Context, resourceGroupName string, name string, backupID string) (*http.Request, error) { +// CreateOrUpdateVnetConnectionGatewayPreparer prepares the CreateOrUpdateVnetConnectionGateway request. +func (client AppsClient) CreateOrUpdateVnetConnectionGatewayPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway) (*http.Request, error) { pathParameters := map[string]interface{}{ - "backupId": autorest.Encode("path", backupID), + "gatewayName": autorest.Encode("path", gatewayName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vnetName": autorest.Encode("path", vnetName), } const APIVersion = "2019-08-01" @@ -3948,43 +3945,52 @@ func (client AppsClient) DeleteBackupPreparer(ctx context.Context, resourceGroup } preparer := autorest.CreatePreparer( - autorest.AsDelete(), + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}", pathParameters), + autorest.WithJSON(connectionEnvelope), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteBackupSender sends the DeleteBackup request. The method will close the +// CreateOrUpdateVnetConnectionGatewaySender sends the CreateOrUpdateVnetConnectionGateway request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteBackupSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) CreateOrUpdateVnetConnectionGatewaySender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteBackupResponder handles the response to the DeleteBackup request. The method always +// CreateOrUpdateVnetConnectionGatewayResponder handles the response to the CreateOrUpdateVnetConnectionGateway request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteBackupResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) CreateOrUpdateVnetConnectionGatewayResponder(resp *http.Response) (result VnetGateway, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) - result.Response = resp + result.Response = autorest.Response{Response: resp} return } -// DeleteBackupConfiguration description for Deletes the backup configuration of an app. +// CreateOrUpdateVnetConnectionGatewaySlot description for Adds a gateway to a connected Virtual Network (PUT) or +// updates it (PATCH). // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -func (client AppsClient) DeleteBackupConfiguration(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) { +// vnetName - name of the Virtual Network. +// gatewayName - name of the gateway. Currently, the only supported string is "primary". +// connectionEnvelope - the properties to update this gateway with. +// slot - name of the deployment slot. If a slot is not specified, the API will add or update a gateway for the +// production slot's Virtual Network. +func (client AppsClient) CreateOrUpdateVnetConnectionGatewaySlot(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway, slot string) (result VnetGateway, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteBackupConfiguration") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateVnetConnectionGatewaySlot") defer func() { sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -3993,37 +3999,43 @@ func (client AppsClient) DeleteBackupConfiguration(ctx context.Context, resource {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", "DeleteBackupConfiguration", err.Error()) + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}, + {TargetValue: connectionEnvelope, + Constraints: []validation.Constraint{{Target: "connectionEnvelope.VnetGatewayProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "connectionEnvelope.VnetGatewayProperties.VpnPackageURI", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "CreateOrUpdateVnetConnectionGatewaySlot", err.Error()) } - req, err := client.DeleteBackupConfigurationPreparer(ctx, resourceGroupName, name) + req, err := client.CreateOrUpdateVnetConnectionGatewaySlotPreparer(ctx, resourceGroupName, name, vnetName, gatewayName, connectionEnvelope, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupConfiguration", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionGatewaySlot", nil, "Failure preparing request") return } - resp, err := client.DeleteBackupConfigurationSender(req) + resp, err := client.CreateOrUpdateVnetConnectionGatewaySlotSender(req) if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupConfiguration", resp, "Failure sending request") - return + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionGatewaySlot", resp, "Failure sending request") + return } - result, err = client.DeleteBackupConfigurationResponder(resp) + result, err = client.CreateOrUpdateVnetConnectionGatewaySlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupConfiguration", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionGatewaySlot", resp, "Failure responding to request") } return } -// DeleteBackupConfigurationPreparer prepares the DeleteBackupConfiguration request. -func (client AppsClient) DeleteBackupConfigurationPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// CreateOrUpdateVnetConnectionGatewaySlotPreparer prepares the CreateOrUpdateVnetConnectionGatewaySlot request. +func (client AppsClient) CreateOrUpdateVnetConnectionGatewaySlotPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "gatewayName": autorest.Encode("path", gatewayName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vnetName": autorest.Encode("path", vnetName), } const APIVersion = "2019-08-01" @@ -4032,45 +4044,51 @@ func (client AppsClient) DeleteBackupConfigurationPreparer(ctx context.Context, } preparer := autorest.CreatePreparer( - autorest.AsDelete(), + 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/backup", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}", pathParameters), + autorest.WithJSON(connectionEnvelope), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteBackupConfigurationSender sends the DeleteBackupConfiguration request. The method will close the +// CreateOrUpdateVnetConnectionGatewaySlotSender sends the CreateOrUpdateVnetConnectionGatewaySlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteBackupConfigurationSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) CreateOrUpdateVnetConnectionGatewaySlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteBackupConfigurationResponder handles the response to the DeleteBackupConfiguration request. The method always +// CreateOrUpdateVnetConnectionGatewaySlotResponder handles the response to the CreateOrUpdateVnetConnectionGatewaySlot request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteBackupConfigurationResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) CreateOrUpdateVnetConnectionGatewaySlotResponder(resp *http.Response) (result VnetGateway, err error) { err = autorest.Respond( resp, client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) - result.Response = resp + result.Response = autorest.Response{Response: resp} return } -// DeleteBackupConfigurationSlot description for Deletes the backup configuration of an app. +// CreateOrUpdateVnetConnectionSlot description for Adds a Virtual Network connection to an app or slot (PUT) or +// updates the connection properties (PATCH). // 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 delete the backup configuration -// for the production slot. -func (client AppsClient) DeleteBackupConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) { +// vnetName - name of an existing Virtual Network. +// connectionEnvelope - properties of the Virtual Network connection. See example. +// slot - name of the deployment slot. If a slot is not specified, the API will add or update connections for +// the production slot. +func (client AppsClient) CreateOrUpdateVnetConnectionSlot(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfo, slot string) (result VnetInfo, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteBackupConfigurationSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateVnetConnectionSlot") defer func() { sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -4080,37 +4098,38 @@ func (client AppsClient) DeleteBackupConfigurationSlot(ctx context.Context, reso 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", "DeleteBackupConfigurationSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "CreateOrUpdateVnetConnectionSlot", err.Error()) } - req, err := client.DeleteBackupConfigurationSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.CreateOrUpdateVnetConnectionSlotPreparer(ctx, resourceGroupName, name, vnetName, connectionEnvelope, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupConfigurationSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionSlot", nil, "Failure preparing request") return } - resp, err := client.DeleteBackupConfigurationSlotSender(req) + resp, err := client.CreateOrUpdateVnetConnectionSlotSender(req) if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupConfigurationSlot", resp, "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionSlot", resp, "Failure sending request") return } - result, err = client.DeleteBackupConfigurationSlotResponder(resp) + result, err = client.CreateOrUpdateVnetConnectionSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupConfigurationSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionSlot", resp, "Failure responding to request") } return } -// DeleteBackupConfigurationSlotPreparer prepares the DeleteBackupConfigurationSlot request. -func (client AppsClient) DeleteBackupConfigurationSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// CreateOrUpdateVnetConnectionSlotPreparer prepares the CreateOrUpdateVnetConnectionSlot request. +func (client AppsClient) CreateOrUpdateVnetConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfo, 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), + "vnetName": autorest.Encode("path", vnetName), } const APIVersion = "2019-08-01" @@ -4119,42 +4138,45 @@ func (client AppsClient) DeleteBackupConfigurationSlotPreparer(ctx context.Conte } preparer := autorest.CreatePreparer( - autorest.AsDelete(), + 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/backup", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}", pathParameters), + autorest.WithJSON(connectionEnvelope), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteBackupConfigurationSlotSender sends the DeleteBackupConfigurationSlot request. The method will close the +// CreateOrUpdateVnetConnectionSlotSender sends the CreateOrUpdateVnetConnectionSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteBackupConfigurationSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) CreateOrUpdateVnetConnectionSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteBackupConfigurationSlotResponder handles the response to the DeleteBackupConfigurationSlot request. The method always +// CreateOrUpdateVnetConnectionSlotResponder handles the response to the CreateOrUpdateVnetConnectionSlot request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteBackupConfigurationSlotResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) CreateOrUpdateVnetConnectionSlotResponder(resp *http.Response) (result VnetInfo, err error) { err = autorest.Respond( resp, client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) - result.Response = resp + result.Response = autorest.Response{Response: resp} return } -// DeleteBackupSlot description for Deletes a backup of an app by its ID. +// Delete description for Deletes a web, mobile, or API app, or one of the deployment slots. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// backupID - ID of the backup. -// slot - name of the deployment slot. If a slot is not specified, the API will delete a backup of the -// production slot. -func (client AppsClient) DeleteBackupSlot(ctx context.Context, resourceGroupName string, name string, backupID string, slot string) (result autorest.Response, err error) { +// name - name of the app to delete. +// deleteMetrics - if true, web app metrics are also deleted. +// deleteEmptyServerFarm - specify false if you want to keep empty App Service plan. By default, empty App +// Service plan is deleted. +func (client AppsClient) Delete(ctx context.Context, resourceGroupName string, name string, deleteMetrics *bool, deleteEmptyServerFarm *bool) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteBackupSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.Delete") defer func() { sc := -1 if result.Response != nil { @@ -4168,37 +4190,35 @@ func (client AppsClient) DeleteBackupSlot(ctx context.Context, 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", "DeleteBackupSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "Delete", err.Error()) } - req, err := client.DeleteBackupSlotPreparer(ctx, resourceGroupName, name, backupID, slot) + req, err := client.DeletePreparer(ctx, resourceGroupName, name, deleteMetrics, deleteEmptyServerFarm) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "Delete", nil, "Failure preparing request") return } - resp, err := client.DeleteBackupSlotSender(req) + resp, err := client.DeleteSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "Delete", resp, "Failure sending request") return } - result, err = client.DeleteBackupSlotResponder(resp) + result, err = client.DeleteResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "Delete", resp, "Failure responding to request") } return } -// DeleteBackupSlotPreparer prepares the DeleteBackupSlot request. -func (client AppsClient) DeleteBackupSlotPreparer(ctx context.Context, resourceGroupName string, name string, backupID string, slot string) (*http.Request, error) { +// DeletePreparer prepares the Delete request. +func (client AppsClient) DeletePreparer(ctx context.Context, resourceGroupName string, name string, deleteMetrics *bool, deleteEmptyServerFarm *bool) (*http.Request, error) { pathParameters := map[string]interface{}{ - "backupId": autorest.Encode("path", backupID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -4206,42 +4226,48 @@ func (client AppsClient) DeleteBackupSlotPreparer(ctx context.Context, resourceG queryParameters := map[string]interface{}{ "api-version": APIVersion, } + if deleteMetrics != nil { + queryParameters["deleteMetrics"] = autorest.Encode("query", *deleteMetrics) + } + if deleteEmptyServerFarm != nil { + queryParameters["deleteEmptyServerFarm"] = autorest.Encode("query", *deleteEmptyServerFarm) + } preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteBackupSlotSender sends the DeleteBackupSlot request. The method will close the +// DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteBackupSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteBackupSlotResponder handles the response to the DeleteBackupSlot request. The method always +// DeleteResponder handles the response to the Delete request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteBackupSlotResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), autorest.ByClosing()) result.Response = resp return } -// DeleteContinuousWebJob description for Delete a continuous web job by its ID for an app, or a deployment slot. +// DeleteBackup description for Deletes a backup of an app by its ID. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// webJobName - name of Web Job. -func (client AppsClient) DeleteContinuousWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string) (result autorest.Response, err error) { +// name - name of the app. +// backupID - ID of the backup. +func (client AppsClient) DeleteBackup(ctx context.Context, resourceGroupName string, name string, backupID string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteContinuousWebJob") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteBackup") defer func() { sc := -1 if result.Response != nil { @@ -4255,37 +4281,37 @@ func (client AppsClient) DeleteContinuousWebJob(ctx context.Context, resourceGro 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", "DeleteContinuousWebJob", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteBackup", err.Error()) } - req, err := client.DeleteContinuousWebJobPreparer(ctx, resourceGroupName, name, webJobName) + req, err := client.DeleteBackupPreparer(ctx, resourceGroupName, name, backupID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteContinuousWebJob", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackup", nil, "Failure preparing request") return } - resp, err := client.DeleteContinuousWebJobSender(req) + resp, err := client.DeleteBackupSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteContinuousWebJob", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackup", resp, "Failure sending request") return } - result, err = client.DeleteContinuousWebJobResponder(resp) + result, err = client.DeleteBackupResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteContinuousWebJob", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackup", resp, "Failure responding to request") } return } -// DeleteContinuousWebJobPreparer prepares the DeleteContinuousWebJob request. -func (client AppsClient) DeleteContinuousWebJobPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string) (*http.Request, error) { +// DeleteBackupPreparer prepares the DeleteBackup request. +func (client AppsClient) DeleteBackupPreparer(ctx context.Context, resourceGroupName string, name string, backupID string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "backupId": autorest.Encode("path", backupID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "webJobName": autorest.Encode("path", webJobName), } const APIVersion = "2019-08-01" @@ -4296,40 +4322,37 @@ func (client AppsClient) DeleteContinuousWebJobPreparer(ctx context.Context, res preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteContinuousWebJobSender sends the DeleteContinuousWebJob request. The method will close the +// DeleteBackupSender sends the DeleteBackup request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteContinuousWebJobSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteBackupSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteContinuousWebJobResponder handles the response to the DeleteContinuousWebJob request. The method always +// DeleteBackupResponder handles the response to the DeleteBackup request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteContinuousWebJobResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteBackupResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), autorest.ByClosing()) result.Response = resp return } -// DeleteContinuousWebJobSlot description for Delete a continuous web job by its ID for an app, or a deployment slot. +// DeleteBackupConfiguration description for Deletes the backup configuration of an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// webJobName - name of Web Job. -// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the -// production slot. -func (client AppsClient) DeleteContinuousWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result autorest.Response, err error) { +// name - name of the app. +func (client AppsClient) DeleteBackupConfiguration(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteContinuousWebJobSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteBackupConfiguration") defer func() { sc := -1 if result.Response != nil { @@ -4343,38 +4366,36 @@ func (client AppsClient) DeleteContinuousWebJobSlot(ctx context.Context, resourc 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", "DeleteContinuousWebJobSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteBackupConfiguration", err.Error()) } - req, err := client.DeleteContinuousWebJobSlotPreparer(ctx, resourceGroupName, name, webJobName, slot) + req, err := client.DeleteBackupConfigurationPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteContinuousWebJobSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupConfiguration", nil, "Failure preparing request") return } - resp, err := client.DeleteContinuousWebJobSlotSender(req) + resp, err := client.DeleteBackupConfigurationSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteContinuousWebJobSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupConfiguration", resp, "Failure sending request") return } - result, err = client.DeleteContinuousWebJobSlotResponder(resp) + result, err = client.DeleteBackupConfigurationResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteContinuousWebJobSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupConfiguration", resp, "Failure responding to request") } return } -// DeleteContinuousWebJobSlotPreparer prepares the DeleteContinuousWebJobSlot request. -func (client AppsClient) DeleteContinuousWebJobSlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (*http.Request, error) { +// DeleteBackupConfigurationPreparer prepares the DeleteBackupConfiguration request. +func (client AppsClient) DeleteBackupConfigurationPreparer(ctx context.Context, resourceGroupName string, name 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), - "webJobName": autorest.Encode("path", webJobName), } const APIVersion = "2019-08-01" @@ -4385,38 +4406,39 @@ func (client AppsClient) DeleteContinuousWebJobSlotPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteContinuousWebJobSlotSender sends the DeleteContinuousWebJobSlot request. The method will close the +// DeleteBackupConfigurationSender sends the DeleteBackupConfiguration request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteContinuousWebJobSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteBackupConfigurationSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteContinuousWebJobSlotResponder handles the response to the DeleteContinuousWebJobSlot request. The method always +// DeleteBackupConfigurationResponder handles the response to the DeleteBackupConfiguration request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteContinuousWebJobSlotResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteBackupConfigurationResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByClosing()) result.Response = resp return } -// DeleteDeployment description for Delete a deployment by its ID for an app, or a deployment slot. +// DeleteBackupConfigurationSlot description for Deletes the backup configuration of an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// ID - deployment ID. -func (client AppsClient) DeleteDeployment(ctx context.Context, resourceGroupName string, name string, ID string) (result autorest.Response, err error) { +// slot - name of the deployment slot. If a slot is not specified, the API will delete the backup configuration +// for the production slot. +func (client AppsClient) DeleteBackupConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteDeployment") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteBackupConfigurationSlot") defer func() { sc := -1 if result.Response != nil { @@ -4430,36 +4452,36 @@ func (client AppsClient) DeleteDeployment(ctx context.Context, 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", "DeleteDeployment", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteBackupConfigurationSlot", err.Error()) } - req, err := client.DeleteDeploymentPreparer(ctx, resourceGroupName, name, ID) + req, err := client.DeleteBackupConfigurationSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDeployment", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupConfigurationSlot", nil, "Failure preparing request") return } - resp, err := client.DeleteDeploymentSender(req) + resp, err := client.DeleteBackupConfigurationSlotSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDeployment", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupConfigurationSlot", resp, "Failure sending request") return } - result, err = client.DeleteDeploymentResponder(resp) + result, err = client.DeleteBackupConfigurationSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDeployment", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupConfigurationSlot", resp, "Failure responding to request") } return } -// DeleteDeploymentPreparer prepares the DeleteDeployment request. -func (client AppsClient) DeleteDeploymentPreparer(ctx context.Context, resourceGroupName string, name string, ID string) (*http.Request, error) { +// DeleteBackupConfigurationSlotPreparer prepares the DeleteBackupConfigurationSlot request. +func (client AppsClient) DeleteBackupConfigurationSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "id": autorest.Encode("path", ID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -4471,40 +4493,40 @@ func (client AppsClient) DeleteDeploymentPreparer(ctx context.Context, resourceG preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteDeploymentSender sends the DeleteDeployment request. The method will close the +// DeleteBackupConfigurationSlotSender sends the DeleteBackupConfigurationSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteDeploymentSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteBackupConfigurationSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteDeploymentResponder handles the response to the DeleteDeployment request. The method always +// DeleteBackupConfigurationSlotResponder handles the response to the DeleteBackupConfigurationSlot request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteDeploymentResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteBackupConfigurationSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByClosing()) result.Response = resp return } -// DeleteDeploymentSlot description for Delete a deployment by its ID for an app, or a deployment slot. +// DeleteBackupSlot description for Deletes a backup of an app by its ID. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// ID - deployment ID. -// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the +// backupID - ID of the backup. +// slot - name of the deployment slot. If a slot is not specified, the API will delete a backup of the // production slot. -func (client AppsClient) DeleteDeploymentSlot(ctx context.Context, resourceGroupName string, name string, ID string, slot string) (result autorest.Response, err error) { +func (client AppsClient) DeleteBackupSlot(ctx context.Context, resourceGroupName string, name string, backupID string, slot string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteDeploymentSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteBackupSlot") defer func() { sc := -1 if result.Response != nil { @@ -4518,34 +4540,34 @@ func (client AppsClient) DeleteDeploymentSlot(ctx context.Context, resourceGroup 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", "DeleteDeploymentSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteBackupSlot", err.Error()) } - req, err := client.DeleteDeploymentSlotPreparer(ctx, resourceGroupName, name, ID, slot) + req, err := client.DeleteBackupSlotPreparer(ctx, resourceGroupName, name, backupID, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDeploymentSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupSlot", nil, "Failure preparing request") return } - resp, err := client.DeleteDeploymentSlotSender(req) + resp, err := client.DeleteBackupSlotSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDeploymentSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupSlot", resp, "Failure sending request") return } - result, err = client.DeleteDeploymentSlotResponder(resp) + result, err = client.DeleteBackupSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDeploymentSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupSlot", resp, "Failure responding to request") } return } -// DeleteDeploymentSlotPreparer prepares the DeleteDeploymentSlot request. -func (client AppsClient) DeleteDeploymentSlotPreparer(ctx context.Context, resourceGroupName string, name string, ID string, slot string) (*http.Request, error) { +// DeleteBackupSlotPreparer prepares the DeleteBackupSlot request. +func (client AppsClient) DeleteBackupSlotPreparer(ctx context.Context, resourceGroupName string, name string, backupID string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "id": autorest.Encode("path", ID), + "backupId": autorest.Encode("path", backupID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), @@ -4560,38 +4582,38 @@ func (client AppsClient) DeleteDeploymentSlotPreparer(ctx context.Context, resou preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteDeploymentSlotSender sends the DeleteDeploymentSlot request. The method will close the +// DeleteBackupSlotSender sends the DeleteBackupSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteDeploymentSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteBackupSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteDeploymentSlotResponder handles the response to the DeleteDeploymentSlot request. The method always +// DeleteBackupSlotResponder handles the response to the DeleteBackupSlot request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteDeploymentSlotResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteBackupSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), autorest.ByClosing()) result.Response = resp return } -// DeleteDomainOwnershipIdentifier description for Deletes a domain ownership identifier for a web app. +// DeleteContinuousWebJob description for Delete a continuous web job by its ID for an app, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// domainOwnershipIdentifierName - name of domain ownership identifier. -func (client AppsClient) DeleteDomainOwnershipIdentifier(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string) (result autorest.Response, err error) { +// name - site name. +// webJobName - name of Web Job. +func (client AppsClient) DeleteContinuousWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteDomainOwnershipIdentifier") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteContinuousWebJob") defer func() { sc := -1 if result.Response != nil { @@ -4605,37 +4627,37 @@ func (client AppsClient) DeleteDomainOwnershipIdentifier(ctx context.Context, re 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", "DeleteDomainOwnershipIdentifier", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteContinuousWebJob", err.Error()) } - req, err := client.DeleteDomainOwnershipIdentifierPreparer(ctx, resourceGroupName, name, domainOwnershipIdentifierName) + req, err := client.DeleteContinuousWebJobPreparer(ctx, resourceGroupName, name, webJobName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDomainOwnershipIdentifier", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteContinuousWebJob", nil, "Failure preparing request") return } - resp, err := client.DeleteDomainOwnershipIdentifierSender(req) + resp, err := client.DeleteContinuousWebJobSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDomainOwnershipIdentifier", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteContinuousWebJob", resp, "Failure sending request") return } - result, err = client.DeleteDomainOwnershipIdentifierResponder(resp) + result, err = client.DeleteContinuousWebJobResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDomainOwnershipIdentifier", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteContinuousWebJob", resp, "Failure responding to request") } return } -// DeleteDomainOwnershipIdentifierPreparer prepares the DeleteDomainOwnershipIdentifier request. -func (client AppsClient) DeleteDomainOwnershipIdentifierPreparer(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string) (*http.Request, error) { +// DeleteContinuousWebJobPreparer prepares the DeleteContinuousWebJob request. +func (client AppsClient) DeleteContinuousWebJobPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "domainOwnershipIdentifierName": autorest.Encode("path", domainOwnershipIdentifierName), - "name": autorest.Encode("path", name), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "webJobName": autorest.Encode("path", webJobName), } const APIVersion = "2019-08-01" @@ -4646,21 +4668,21 @@ func (client AppsClient) DeleteDomainOwnershipIdentifierPreparer(ctx context.Con preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteDomainOwnershipIdentifierSender sends the DeleteDomainOwnershipIdentifier request. The method will close the +// DeleteContinuousWebJobSender sends the DeleteContinuousWebJob request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteDomainOwnershipIdentifierSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteContinuousWebJobSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteDomainOwnershipIdentifierResponder handles the response to the DeleteDomainOwnershipIdentifier request. The method always +// DeleteContinuousWebJobResponder handles the response to the DeleteContinuousWebJob request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteDomainOwnershipIdentifierResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteContinuousWebJobResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -4670,16 +4692,16 @@ func (client AppsClient) DeleteDomainOwnershipIdentifierResponder(resp *http.Res return } -// DeleteDomainOwnershipIdentifierSlot description for Deletes a domain ownership identifier for a web app. +// DeleteContinuousWebJobSlot description for Delete a continuous web job by its ID for an app, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// domainOwnershipIdentifierName - name of domain ownership identifier. -// slot - name of the deployment slot. If a slot is not specified, the API will delete the binding for the +// name - site name. +// webJobName - name of Web Job. +// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the // production slot. -func (client AppsClient) DeleteDomainOwnershipIdentifierSlot(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string) (result autorest.Response, err error) { +func (client AppsClient) DeleteContinuousWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteDomainOwnershipIdentifierSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteContinuousWebJobSlot") defer func() { sc := -1 if result.Response != nil { @@ -4693,38 +4715,38 @@ func (client AppsClient) DeleteDomainOwnershipIdentifierSlot(ctx context.Context 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", "DeleteDomainOwnershipIdentifierSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteContinuousWebJobSlot", err.Error()) } - req, err := client.DeleteDomainOwnershipIdentifierSlotPreparer(ctx, resourceGroupName, name, domainOwnershipIdentifierName, slot) + req, err := client.DeleteContinuousWebJobSlotPreparer(ctx, resourceGroupName, name, webJobName, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDomainOwnershipIdentifierSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteContinuousWebJobSlot", nil, "Failure preparing request") return } - resp, err := client.DeleteDomainOwnershipIdentifierSlotSender(req) + resp, err := client.DeleteContinuousWebJobSlotSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDomainOwnershipIdentifierSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteContinuousWebJobSlot", resp, "Failure sending request") return } - result, err = client.DeleteDomainOwnershipIdentifierSlotResponder(resp) + result, err = client.DeleteContinuousWebJobSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDomainOwnershipIdentifierSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteContinuousWebJobSlot", resp, "Failure responding to request") } return } -// DeleteDomainOwnershipIdentifierSlotPreparer prepares the DeleteDomainOwnershipIdentifierSlot request. -func (client AppsClient) DeleteDomainOwnershipIdentifierSlotPreparer(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string) (*http.Request, error) { +// DeleteContinuousWebJobSlotPreparer prepares the DeleteContinuousWebJobSlot request. +func (client AppsClient) DeleteContinuousWebJobSlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "domainOwnershipIdentifierName": autorest.Encode("path", domainOwnershipIdentifierName), - "name": autorest.Encode("path", name), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "webJobName": autorest.Encode("path", webJobName), } const APIVersion = "2019-08-01" @@ -4735,21 +4757,21 @@ func (client AppsClient) DeleteDomainOwnershipIdentifierSlotPreparer(ctx context preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteDomainOwnershipIdentifierSlotSender sends the DeleteDomainOwnershipIdentifierSlot request. The method will close the +// DeleteContinuousWebJobSlotSender sends the DeleteContinuousWebJobSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteDomainOwnershipIdentifierSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteContinuousWebJobSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteDomainOwnershipIdentifierSlotResponder handles the response to the DeleteDomainOwnershipIdentifierSlot request. The method always +// DeleteContinuousWebJobSlotResponder handles the response to the DeleteContinuousWebJobSlot request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteDomainOwnershipIdentifierSlotResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteContinuousWebJobSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -4759,14 +4781,14 @@ func (client AppsClient) DeleteDomainOwnershipIdentifierSlotResponder(resp *http return } -// DeleteFunction description for Delete a function for web site, or a deployment slot. +// DeleteDeployment description for Delete a deployment by its ID for an app, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// functionName - function name. -func (client AppsClient) DeleteFunction(ctx context.Context, resourceGroupName string, name string, functionName string) (result autorest.Response, err error) { +// name - name of the app. +// ID - deployment ID. +func (client AppsClient) DeleteDeployment(ctx context.Context, resourceGroupName string, name string, ID string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteFunction") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteDeployment") defer func() { sc := -1 if result.Response != nil { @@ -4780,34 +4802,34 @@ func (client AppsClient) DeleteFunction(ctx context.Context, resourceGroupName s 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", "DeleteFunction", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteDeployment", err.Error()) } - req, err := client.DeleteFunctionPreparer(ctx, resourceGroupName, name, functionName) + req, err := client.DeleteDeploymentPreparer(ctx, resourceGroupName, name, ID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunction", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDeployment", nil, "Failure preparing request") return } - resp, err := client.DeleteFunctionSender(req) + resp, err := client.DeleteDeploymentSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunction", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDeployment", resp, "Failure sending request") return } - result, err = client.DeleteFunctionResponder(resp) + result, err = client.DeleteDeploymentResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunction", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDeployment", resp, "Failure responding to request") } return } -// DeleteFunctionPreparer prepares the DeleteFunction request. -func (client AppsClient) DeleteFunctionPreparer(ctx context.Context, resourceGroupName string, name string, functionName string) (*http.Request, error) { +// DeleteDeploymentPreparer prepares the DeleteDeployment request. +func (client AppsClient) DeleteDeploymentPreparer(ctx context.Context, resourceGroupName string, name string, ID string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "functionName": autorest.Encode("path", functionName), + "id": autorest.Encode("path", ID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -4821,38 +4843,40 @@ func (client AppsClient) DeleteFunctionPreparer(ctx context.Context, resourceGro preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteFunctionSender sends the DeleteFunction request. The method will close the +// DeleteDeploymentSender sends the DeleteDeployment request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteFunctionSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteDeploymentSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteFunctionResponder handles the response to the DeleteFunction request. The method always +// DeleteDeploymentResponder handles the response to the DeleteDeployment request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteFunctionResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteDeploymentResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) result.Response = resp return } -// DeleteHostNameBinding description for Deletes a hostname binding for an app. +// DeleteDeploymentSlot description for Delete a deployment by its ID for an app, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// hostName - hostname in the hostname binding. -func (client AppsClient) DeleteHostNameBinding(ctx context.Context, resourceGroupName string, name string, hostName string) (result autorest.Response, err error) { +// ID - deployment ID. +// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the +// production slot. +func (client AppsClient) DeleteDeploymentSlot(ctx context.Context, resourceGroupName string, name string, ID string, slot string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteHostNameBinding") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteDeploymentSlot") defer func() { sc := -1 if result.Response != nil { @@ -4866,36 +4890,37 @@ func (client AppsClient) DeleteHostNameBinding(ctx context.Context, resourceGrou 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", "DeleteHostNameBinding", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteDeploymentSlot", err.Error()) } - req, err := client.DeleteHostNameBindingPreparer(ctx, resourceGroupName, name, hostName) + req, err := client.DeleteDeploymentSlotPreparer(ctx, resourceGroupName, name, ID, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostNameBinding", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDeploymentSlot", nil, "Failure preparing request") return } - resp, err := client.DeleteHostNameBindingSender(req) + resp, err := client.DeleteDeploymentSlotSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostNameBinding", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDeploymentSlot", resp, "Failure sending request") return } - result, err = client.DeleteHostNameBindingResponder(resp) + result, err = client.DeleteDeploymentSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostNameBinding", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDeploymentSlot", resp, "Failure responding to request") } return } -// DeleteHostNameBindingPreparer prepares the DeleteHostNameBinding request. -func (client AppsClient) DeleteHostNameBindingPreparer(ctx context.Context, resourceGroupName string, name string, hostName string) (*http.Request, error) { +// DeleteDeploymentSlotPreparer prepares the DeleteDeploymentSlot request. +func (client AppsClient) DeleteDeploymentSlotPreparer(ctx context.Context, resourceGroupName string, name string, ID string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "hostName": autorest.Encode("path", hostName), + "id": autorest.Encode("path", ID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -4907,21 +4932,21 @@ func (client AppsClient) DeleteHostNameBindingPreparer(ctx context.Context, reso preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteHostNameBindingSender sends the DeleteHostNameBinding request. The method will close the +// DeleteDeploymentSlotSender sends the DeleteDeploymentSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteHostNameBindingSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteDeploymentSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteHostNameBindingResponder handles the response to the DeleteHostNameBinding request. The method always +// DeleteDeploymentSlotResponder handles the response to the DeleteDeploymentSlot request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteHostNameBindingResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteDeploymentSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -4931,16 +4956,14 @@ func (client AppsClient) DeleteHostNameBindingResponder(resp *http.Response) (re return } -// DeleteHostNameBindingSlot description for Deletes a hostname binding for an app. +// DeleteDomainOwnershipIdentifier description for Deletes a domain ownership identifier for a web 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 delete the binding for the -// production slot. -// hostName - hostname in the hostname binding. -func (client AppsClient) DeleteHostNameBindingSlot(ctx context.Context, resourceGroupName string, name string, slot string, hostName string) (result autorest.Response, err error) { +// domainOwnershipIdentifierName - name of domain ownership identifier. +func (client AppsClient) DeleteDomainOwnershipIdentifier(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteHostNameBindingSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteDomainOwnershipIdentifier") defer func() { sc := -1 if result.Response != nil { @@ -4954,38 +4977,37 @@ func (client AppsClient) DeleteHostNameBindingSlot(ctx context.Context, resource 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", "DeleteHostNameBindingSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteDomainOwnershipIdentifier", err.Error()) } - req, err := client.DeleteHostNameBindingSlotPreparer(ctx, resourceGroupName, name, slot, hostName) + req, err := client.DeleteDomainOwnershipIdentifierPreparer(ctx, resourceGroupName, name, domainOwnershipIdentifierName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostNameBindingSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDomainOwnershipIdentifier", nil, "Failure preparing request") return } - resp, err := client.DeleteHostNameBindingSlotSender(req) + resp, err := client.DeleteDomainOwnershipIdentifierSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostNameBindingSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDomainOwnershipIdentifier", resp, "Failure sending request") return } - result, err = client.DeleteHostNameBindingSlotResponder(resp) + result, err = client.DeleteDomainOwnershipIdentifierResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostNameBindingSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDomainOwnershipIdentifier", resp, "Failure responding to request") } return } -// DeleteHostNameBindingSlotPreparer prepares the DeleteHostNameBindingSlot request. -func (client AppsClient) DeleteHostNameBindingSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, hostName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "hostName": autorest.Encode("path", hostName), - "name": autorest.Encode("path", name), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), +// DeleteDomainOwnershipIdentifierPreparer prepares the DeleteDomainOwnershipIdentifier request. +func (client AppsClient) DeleteDomainOwnershipIdentifierPreparer(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "domainOwnershipIdentifierName": autorest.Encode("path", domainOwnershipIdentifierName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2019-08-01" @@ -4996,21 +5018,21 @@ func (client AppsClient) DeleteHostNameBindingSlotPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteHostNameBindingSlotSender sends the DeleteHostNameBindingSlot request. The method will close the +// DeleteDomainOwnershipIdentifierSender sends the DeleteDomainOwnershipIdentifier request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteHostNameBindingSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteDomainOwnershipIdentifierSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteHostNameBindingSlotResponder handles the response to the DeleteHostNameBindingSlot request. The method always +// DeleteDomainOwnershipIdentifierResponder handles the response to the DeleteDomainOwnershipIdentifier request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteHostNameBindingSlotResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteDomainOwnershipIdentifierResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -5020,15 +5042,16 @@ func (client AppsClient) DeleteHostNameBindingSlotResponder(resp *http.Response) return } -// DeleteHybridConnection description for Removes a Hybrid Connection from this site. +// DeleteDomainOwnershipIdentifierSlot description for Deletes a domain ownership identifier for a web app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - the name of the web app. -// namespaceName - the namespace for this hybrid connection. -// relayName - the relay name for this hybrid connection. -func (client AppsClient) DeleteHybridConnection(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string) (result autorest.Response, err error) { +// name - name of the app. +// domainOwnershipIdentifierName - name of domain ownership identifier. +// slot - name of the deployment slot. If a slot is not specified, the API will delete the binding for the +// production slot. +func (client AppsClient) DeleteDomainOwnershipIdentifierSlot(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteHybridConnection") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteDomainOwnershipIdentifierSlot") defer func() { sc := -1 if result.Response != nil { @@ -5042,38 +5065,38 @@ func (client AppsClient) DeleteHybridConnection(ctx context.Context, resourceGro 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", "DeleteHybridConnection", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteDomainOwnershipIdentifierSlot", err.Error()) } - req, err := client.DeleteHybridConnectionPreparer(ctx, resourceGroupName, name, namespaceName, relayName) + req, err := client.DeleteDomainOwnershipIdentifierSlotPreparer(ctx, resourceGroupName, name, domainOwnershipIdentifierName, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHybridConnection", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDomainOwnershipIdentifierSlot", nil, "Failure preparing request") return } - resp, err := client.DeleteHybridConnectionSender(req) + resp, err := client.DeleteDomainOwnershipIdentifierSlotSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHybridConnection", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDomainOwnershipIdentifierSlot", resp, "Failure sending request") return } - result, err = client.DeleteHybridConnectionResponder(resp) + result, err = client.DeleteDomainOwnershipIdentifierSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHybridConnection", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDomainOwnershipIdentifierSlot", resp, "Failure responding to request") } return } -// DeleteHybridConnectionPreparer prepares the DeleteHybridConnection request. -func (client AppsClient) DeleteHybridConnectionPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string) (*http.Request, error) { +// DeleteDomainOwnershipIdentifierSlotPreparer prepares the DeleteDomainOwnershipIdentifierSlot request. +func (client AppsClient) DeleteDomainOwnershipIdentifierSlotPreparer(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "name": autorest.Encode("path", name), - "namespaceName": autorest.Encode("path", namespaceName), - "relayName": autorest.Encode("path", relayName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "domainOwnershipIdentifierName": autorest.Encode("path", domainOwnershipIdentifierName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2019-08-01" @@ -5084,40 +5107,38 @@ func (client AppsClient) DeleteHybridConnectionPreparer(ctx context.Context, res preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteHybridConnectionSender sends the DeleteHybridConnection request. The method will close the +// DeleteDomainOwnershipIdentifierSlotSender sends the DeleteDomainOwnershipIdentifierSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteHybridConnectionSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteDomainOwnershipIdentifierSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteHybridConnectionResponder handles the response to the DeleteHybridConnection request. The method always +// DeleteDomainOwnershipIdentifierSlotResponder handles the response to the DeleteDomainOwnershipIdentifierSlot request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteHybridConnectionResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteDomainOwnershipIdentifierSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) result.Response = resp return } -// DeleteHybridConnectionSlot description for Removes a Hybrid Connection from this site. +// DeleteFunction description for Delete a function for web site, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - the name of the web app. -// namespaceName - the namespace for this hybrid connection. -// relayName - the relay name for this hybrid connection. -// slot - the name of the slot for the web app. -func (client AppsClient) DeleteHybridConnectionSlot(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string) (result autorest.Response, err error) { +// name - site name. +// functionName - function name. +func (client AppsClient) DeleteFunction(ctx context.Context, resourceGroupName string, name string, functionName string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteHybridConnectionSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteFunction") defer func() { sc := -1 if result.Response != nil { @@ -5131,38 +5152,36 @@ func (client AppsClient) DeleteHybridConnectionSlot(ctx context.Context, resourc 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", "DeleteHybridConnectionSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteFunction", err.Error()) } - req, err := client.DeleteHybridConnectionSlotPreparer(ctx, resourceGroupName, name, namespaceName, relayName, slot) + req, err := client.DeleteFunctionPreparer(ctx, resourceGroupName, name, functionName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHybridConnectionSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunction", nil, "Failure preparing request") return } - resp, err := client.DeleteHybridConnectionSlotSender(req) + resp, err := client.DeleteFunctionSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHybridConnectionSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunction", resp, "Failure sending request") return } - result, err = client.DeleteHybridConnectionSlotResponder(resp) + result, err = client.DeleteFunctionResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHybridConnectionSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunction", resp, "Failure responding to request") } return } -// DeleteHybridConnectionSlotPreparer prepares the DeleteHybridConnectionSlot request. -func (client AppsClient) DeleteHybridConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string) (*http.Request, error) { +// DeleteFunctionPreparer prepares the DeleteFunction request. +func (client AppsClient) DeleteFunctionPreparer(ctx context.Context, resourceGroupName string, name string, functionName string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "functionName": autorest.Encode("path", functionName), "name": autorest.Encode("path", name), - "namespaceName": autorest.Encode("path", namespaceName), - "relayName": autorest.Encode("path", relayName), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -5174,39 +5193,39 @@ func (client AppsClient) DeleteHybridConnectionSlotPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteHybridConnectionSlotSender sends the DeleteHybridConnectionSlot request. The method will close the +// DeleteFunctionSender sends the DeleteFunction request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteHybridConnectionSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteFunctionSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteHybridConnectionSlotResponder handles the response to the DeleteHybridConnectionSlot request. The method always +// DeleteFunctionResponder handles the response to the DeleteFunction request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteHybridConnectionSlotResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteFunctionResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), autorest.ByClosing()) result.Response = resp return } -// DeleteInstanceFunctionSlot description for Delete a function for web site, or a deployment slot. +// DeleteFunctionSecret description for Delete a function secret. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - site name. -// functionName - function name. -// slot - name of the deployment slot. -func (client AppsClient) DeleteInstanceFunctionSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (result autorest.Response, err error) { +// functionName - the name of the function. +// keyName - the name of the key. +func (client AppsClient) DeleteFunctionSecret(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteInstanceFunctionSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteFunctionSecret") defer func() { sc := -1 if result.Response != nil { @@ -5220,37 +5239,37 @@ func (client AppsClient) DeleteInstanceFunctionSlot(ctx context.Context, resourc 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", "DeleteInstanceFunctionSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteFunctionSecret", err.Error()) } - req, err := client.DeleteInstanceFunctionSlotPreparer(ctx, resourceGroupName, name, functionName, slot) + req, err := client.DeleteFunctionSecretPreparer(ctx, resourceGroupName, name, functionName, keyName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceFunctionSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunctionSecret", nil, "Failure preparing request") return } - resp, err := client.DeleteInstanceFunctionSlotSender(req) + resp, err := client.DeleteFunctionSecretSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceFunctionSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunctionSecret", resp, "Failure sending request") return } - result, err = client.DeleteInstanceFunctionSlotResponder(resp) + result, err = client.DeleteFunctionSecretResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceFunctionSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunctionSecret", resp, "Failure responding to request") } return } -// DeleteInstanceFunctionSlotPreparer prepares the DeleteInstanceFunctionSlot request. -func (client AppsClient) DeleteInstanceFunctionSlotPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (*http.Request, error) { +// DeleteFunctionSecretPreparer prepares the DeleteFunctionSecret request. +func (client AppsClient) DeleteFunctionSecretPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "functionName": autorest.Encode("path", functionName), + "keyName": autorest.Encode("path", keyName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -5262,21 +5281,21 @@ func (client AppsClient) DeleteInstanceFunctionSlotPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteInstanceFunctionSlotSender sends the DeleteInstanceFunctionSlot request. The method will close the +// DeleteFunctionSecretSender sends the DeleteFunctionSecret request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteInstanceFunctionSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteFunctionSecretSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteInstanceFunctionSlotResponder handles the response to the DeleteInstanceFunctionSlot request. The method always +// DeleteFunctionSecretResponder handles the response to the DeleteFunctionSecret request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteInstanceFunctionSlotResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteFunctionSecretResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -5286,17 +5305,16 @@ func (client AppsClient) DeleteInstanceFunctionSlotResponder(resp *http.Response return } -// DeleteInstanceProcess description for Terminate a process by its ID for a web site, or a deployment slot, or -// specific scaled-out instance in a web site. +// DeleteFunctionSecretSlot description for Delete a function secret. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - site name. -// processID - pID. -// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON -// response from "GET api/sites/{siteName}/instances". -func (client AppsClient) DeleteInstanceProcess(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (result autorest.Response, err error) { +// functionName - the name of the function. +// keyName - the name of the key. +// slot - name of the deployment slot. +func (client AppsClient) DeleteFunctionSecretSlot(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, slot string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteInstanceProcess") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteFunctionSecretSlot") defer func() { sc := -1 if result.Response != nil { @@ -5310,37 +5328,38 @@ func (client AppsClient) DeleteInstanceProcess(ctx context.Context, resourceGrou 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", "DeleteInstanceProcess", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteFunctionSecretSlot", err.Error()) } - req, err := client.DeleteInstanceProcessPreparer(ctx, resourceGroupName, name, processID, instanceID) + req, err := client.DeleteFunctionSecretSlotPreparer(ctx, resourceGroupName, name, functionName, keyName, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceProcess", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunctionSecretSlot", nil, "Failure preparing request") return } - resp, err := client.DeleteInstanceProcessSender(req) + resp, err := client.DeleteFunctionSecretSlotSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceProcess", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunctionSecretSlot", resp, "Failure sending request") return } - result, err = client.DeleteInstanceProcessResponder(resp) + result, err = client.DeleteFunctionSecretSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceProcess", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunctionSecretSlot", resp, "Failure responding to request") } return } -// DeleteInstanceProcessPreparer prepares the DeleteInstanceProcess request. -func (client AppsClient) DeleteInstanceProcessPreparer(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (*http.Request, error) { +// DeleteFunctionSecretSlotPreparer prepares the DeleteFunctionSecretSlot request. +func (client AppsClient) DeleteFunctionSecretSlotPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "instanceId": autorest.Encode("path", instanceID), + "functionName": autorest.Encode("path", functionName), + "keyName": autorest.Encode("path", keyName), "name": autorest.Encode("path", name), - "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -5352,21 +5371,21 @@ func (client AppsClient) DeleteInstanceProcessPreparer(ctx context.Context, reso preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteInstanceProcessSender sends the DeleteInstanceProcess request. The method will close the +// DeleteFunctionSecretSlotSender sends the DeleteFunctionSecretSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteInstanceProcessSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteFunctionSecretSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteInstanceProcessResponder handles the response to the DeleteInstanceProcess request. The method always +// DeleteFunctionSecretSlotResponder handles the response to the DeleteFunctionSecretSlot request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteInstanceProcessResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteFunctionSecretSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -5376,19 +5395,14 @@ func (client AppsClient) DeleteInstanceProcessResponder(resp *http.Response) (re return } -// DeleteInstanceProcessSlot description for Terminate a process by its ID for a web site, or a deployment slot, or -// specific scaled-out instance in a web site. +// DeleteHostNameBinding description for Deletes a hostname binding for an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// processID - pID. -// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the -// production slot. -// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON -// response from "GET api/sites/{siteName}/instances". -func (client AppsClient) DeleteInstanceProcessSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (result autorest.Response, err error) { +// name - name of the app. +// hostName - hostname in the hostname binding. +func (client AppsClient) DeleteHostNameBinding(ctx context.Context, resourceGroupName string, name string, hostName string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteInstanceProcessSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteHostNameBinding") defer func() { sc := -1 if result.Response != nil { @@ -5402,38 +5416,36 @@ func (client AppsClient) DeleteInstanceProcessSlot(ctx context.Context, resource 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", "DeleteInstanceProcessSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteHostNameBinding", err.Error()) } - req, err := client.DeleteInstanceProcessSlotPreparer(ctx, resourceGroupName, name, processID, slot, instanceID) + req, err := client.DeleteHostNameBindingPreparer(ctx, resourceGroupName, name, hostName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceProcessSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostNameBinding", nil, "Failure preparing request") return } - resp, err := client.DeleteInstanceProcessSlotSender(req) + resp, err := client.DeleteHostNameBindingSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceProcessSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostNameBinding", resp, "Failure sending request") return } - result, err = client.DeleteInstanceProcessSlotResponder(resp) + result, err = client.DeleteHostNameBindingResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceProcessSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostNameBinding", resp, "Failure responding to request") } return } -// DeleteInstanceProcessSlotPreparer prepares the DeleteInstanceProcessSlot request. -func (client AppsClient) DeleteInstanceProcessSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (*http.Request, error) { +// DeleteHostNameBindingPreparer prepares the DeleteHostNameBinding request. +func (client AppsClient) DeleteHostNameBindingPreparer(ctx context.Context, resourceGroupName string, name string, hostName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "instanceId": autorest.Encode("path", instanceID), + "hostName": autorest.Encode("path", hostName), "name": autorest.Encode("path", name), - "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -5445,38 +5457,40 @@ func (client AppsClient) DeleteInstanceProcessSlotPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteInstanceProcessSlotSender sends the DeleteInstanceProcessSlot request. The method will close the +// DeleteHostNameBindingSender sends the DeleteHostNameBinding request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteInstanceProcessSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteHostNameBindingSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteInstanceProcessSlotResponder handles the response to the DeleteInstanceProcessSlot request. The method always +// DeleteHostNameBindingResponder handles the response to the DeleteHostNameBinding request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteInstanceProcessSlotResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteHostNameBindingResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) result.Response = resp return } -// DeletePremierAddOn description for Delete a premier add-on from an app. +// DeleteHostNameBindingSlot description for Deletes a hostname binding for an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// premierAddOnName - add-on name. -func (client AppsClient) DeletePremierAddOn(ctx context.Context, resourceGroupName string, name string, premierAddOnName string) (result autorest.Response, err error) { +// slot - name of the deployment slot. If a slot is not specified, the API will delete the binding for the +// production slot. +// hostName - hostname in the hostname binding. +func (client AppsClient) DeleteHostNameBindingSlot(ctx context.Context, resourceGroupName string, name string, slot string, hostName string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeletePremierAddOn") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteHostNameBindingSlot") defer func() { sc := -1 if result.Response != nil { @@ -5490,36 +5504,37 @@ func (client AppsClient) DeletePremierAddOn(ctx context.Context, resourceGroupNa 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", "DeletePremierAddOn", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteHostNameBindingSlot", err.Error()) } - req, err := client.DeletePremierAddOnPreparer(ctx, resourceGroupName, name, premierAddOnName) + req, err := client.DeleteHostNameBindingSlotPreparer(ctx, resourceGroupName, name, slot, hostName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePremierAddOn", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostNameBindingSlot", nil, "Failure preparing request") return } - resp, err := client.DeletePremierAddOnSender(req) + resp, err := client.DeleteHostNameBindingSlotSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePremierAddOn", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostNameBindingSlot", resp, "Failure sending request") return } - result, err = client.DeletePremierAddOnResponder(resp) + result, err = client.DeleteHostNameBindingSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePremierAddOn", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostNameBindingSlot", resp, "Failure responding to request") } return } -// DeletePremierAddOnPreparer prepares the DeletePremierAddOn request. -func (client AppsClient) DeletePremierAddOnPreparer(ctx context.Context, resourceGroupName string, name string, premierAddOnName string) (*http.Request, error) { +// DeleteHostNameBindingSlotPreparer prepares the DeleteHostNameBindingSlot request. +func (client AppsClient) DeleteHostNameBindingSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, hostName string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "hostName": autorest.Encode("path", hostName), "name": autorest.Encode("path", name), - "premierAddOnName": autorest.Encode("path", premierAddOnName), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -5531,40 +5546,39 @@ func (client AppsClient) DeletePremierAddOnPreparer(ctx context.Context, resourc preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeletePremierAddOnSender sends the DeletePremierAddOn request. The method will close the +// DeleteHostNameBindingSlotSender sends the DeleteHostNameBindingSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeletePremierAddOnSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteHostNameBindingSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeletePremierAddOnResponder handles the response to the DeletePremierAddOn request. The method always +// DeleteHostNameBindingSlotResponder handles the response to the DeleteHostNameBindingSlot request. The method always // closes the http.Response Body. -func (client AppsClient) DeletePremierAddOnResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteHostNameBindingSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) result.Response = resp return } -// DeletePremierAddOnSlot description for Delete a premier add-on from an app. +// DeleteHostSecret description for Delete a host level secret. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// premierAddOnName - add-on name. -// slot - name of the deployment slot. If a slot is not specified, the API will delete the named add-on for the -// production slot. -func (client AppsClient) DeletePremierAddOnSlot(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string) (result autorest.Response, err error) { +// name - site name. +// keyType - the type of host key. +// keyName - the name of the key. +func (client AppsClient) DeleteHostSecret(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeletePremierAddOnSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteHostSecret") defer func() { sc := -1 if result.Response != nil { @@ -5578,37 +5592,37 @@ func (client AppsClient) DeletePremierAddOnSlot(ctx context.Context, resourceGro 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", "DeletePremierAddOnSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteHostSecret", err.Error()) } - req, err := client.DeletePremierAddOnSlotPreparer(ctx, resourceGroupName, name, premierAddOnName, slot) + req, err := client.DeleteHostSecretPreparer(ctx, resourceGroupName, name, keyType, keyName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePremierAddOnSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostSecret", nil, "Failure preparing request") return } - resp, err := client.DeletePremierAddOnSlotSender(req) + resp, err := client.DeleteHostSecretSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePremierAddOnSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostSecret", resp, "Failure sending request") return } - result, err = client.DeletePremierAddOnSlotResponder(resp) + result, err = client.DeleteHostSecretResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePremierAddOnSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostSecret", resp, "Failure responding to request") } return } -// DeletePremierAddOnSlotPreparer prepares the DeletePremierAddOnSlot request. -func (client AppsClient) DeletePremierAddOnSlotPreparer(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string) (*http.Request, error) { +// DeleteHostSecretPreparer prepares the DeleteHostSecret request. +func (client AppsClient) DeleteHostSecretPreparer(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "keyName": autorest.Encode("path", keyName), + "keyType": autorest.Encode("path", keyType), "name": autorest.Encode("path", name), - "premierAddOnName": autorest.Encode("path", premierAddOnName), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -5620,39 +5634,40 @@ func (client AppsClient) DeletePremierAddOnSlotPreparer(ctx context.Context, res preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeletePremierAddOnSlotSender sends the DeletePremierAddOnSlot request. The method will close the +// DeleteHostSecretSender sends the DeleteHostSecret request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeletePremierAddOnSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteHostSecretSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeletePremierAddOnSlotResponder handles the response to the DeletePremierAddOnSlot request. The method always +// DeleteHostSecretResponder handles the response to the DeleteHostSecret request. The method always // closes the http.Response Body. -func (client AppsClient) DeletePremierAddOnSlotResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteHostSecretResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), autorest.ByClosing()) result.Response = resp return } -// DeleteProcess description for Terminate a process by its ID for a web site, or a deployment slot, or specific -// scaled-out instance in a web site. +// DeleteHostSecretSlot description for Delete a host level secret. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - site name. -// processID - pID. -func (client AppsClient) DeleteProcess(ctx context.Context, resourceGroupName string, name string, processID string) (result autorest.Response, err error) { +// keyType - the type of host key. +// keyName - the name of the key. +// slot - name of the deployment slot. +func (client AppsClient) DeleteHostSecretSlot(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, slot string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteProcess") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteHostSecretSlot") defer func() { sc := -1 if result.Response != nil { @@ -5666,36 +5681,38 @@ func (client AppsClient) DeleteProcess(ctx context.Context, resourceGroupName st 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", "DeleteProcess", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteHostSecretSlot", err.Error()) } - req, err := client.DeleteProcessPreparer(ctx, resourceGroupName, name, processID) + req, err := client.DeleteHostSecretSlotPreparer(ctx, resourceGroupName, name, keyType, keyName, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteProcess", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostSecretSlot", nil, "Failure preparing request") return } - resp, err := client.DeleteProcessSender(req) + resp, err := client.DeleteHostSecretSlotSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteProcess", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostSecretSlot", resp, "Failure sending request") return } - result, err = client.DeleteProcessResponder(resp) + result, err = client.DeleteHostSecretSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteProcess", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostSecretSlot", resp, "Failure responding to request") } return } -// DeleteProcessPreparer prepares the DeleteProcess request. -func (client AppsClient) DeleteProcessPreparer(ctx context.Context, resourceGroupName string, name string, processID string) (*http.Request, error) { +// DeleteHostSecretSlotPreparer prepares the DeleteHostSecretSlot request. +func (client AppsClient) DeleteHostSecretSlotPreparer(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "keyName": autorest.Encode("path", keyName), + "keyType": autorest.Encode("path", keyType), "name": autorest.Encode("path", name), - "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -5707,21 +5724,21 @@ func (client AppsClient) DeleteProcessPreparer(ctx context.Context, resourceGrou preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteProcessSender sends the DeleteProcess request. The method will close the +// DeleteHostSecretSlotSender sends the DeleteHostSecretSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteProcessSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteHostSecretSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteProcessResponder handles the response to the DeleteProcess request. The method always +// DeleteHostSecretSlotResponder handles the response to the DeleteHostSecretSlot request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteProcessResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteHostSecretSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -5731,17 +5748,15 @@ func (client AppsClient) DeleteProcessResponder(resp *http.Response) (result aut return } -// DeleteProcessSlot description for Terminate a process by its ID for a web site, or a deployment slot, or specific -// scaled-out instance in a web site. +// DeleteHybridConnection description for Removes a Hybrid Connection from this site. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// processID - pID. -// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the -// production slot. -func (client AppsClient) DeleteProcessSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result autorest.Response, err error) { +// name - the name of the web app. +// namespaceName - the namespace for this hybrid connection. +// relayName - the relay name for this hybrid connection. +func (client AppsClient) DeleteHybridConnection(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteProcessSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteHybridConnection") defer func() { sc := -1 if result.Response != nil { @@ -5755,37 +5770,37 @@ func (client AppsClient) DeleteProcessSlot(ctx context.Context, resourceGroupNam 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", "DeleteProcessSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteHybridConnection", err.Error()) } - req, err := client.DeleteProcessSlotPreparer(ctx, resourceGroupName, name, processID, slot) + req, err := client.DeleteHybridConnectionPreparer(ctx, resourceGroupName, name, namespaceName, relayName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteProcessSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHybridConnection", nil, "Failure preparing request") return } - resp, err := client.DeleteProcessSlotSender(req) + resp, err := client.DeleteHybridConnectionSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteProcessSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHybridConnection", resp, "Failure sending request") return } - result, err = client.DeleteProcessSlotResponder(resp) + result, err = client.DeleteHybridConnectionResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteProcessSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHybridConnection", resp, "Failure responding to request") } return } -// DeleteProcessSlotPreparer prepares the DeleteProcessSlot request. -func (client AppsClient) DeleteProcessSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (*http.Request, error) { +// DeleteHybridConnectionPreparer prepares the DeleteHybridConnection request. +func (client AppsClient) DeleteHybridConnectionPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), - "processId": autorest.Encode("path", processID), + "namespaceName": autorest.Encode("path", namespaceName), + "relayName": autorest.Encode("path", relayName), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -5797,38 +5812,40 @@ func (client AppsClient) DeleteProcessSlotPreparer(ctx context.Context, resource preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteProcessSlotSender sends the DeleteProcessSlot request. The method will close the +// DeleteHybridConnectionSender sends the DeleteHybridConnection request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteProcessSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteHybridConnectionSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteProcessSlotResponder handles the response to the DeleteProcessSlot request. The method always +// DeleteHybridConnectionResponder handles the response to the DeleteHybridConnection request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteProcessSlotResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteHybridConnectionResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), autorest.ByClosing()) result.Response = resp return } -// DeletePublicCertificate description for Deletes a hostname binding for an app. +// DeleteHybridConnectionSlot description for Removes a Hybrid Connection from this site. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// publicCertificateName - public certificate name. -func (client AppsClient) DeletePublicCertificate(ctx context.Context, resourceGroupName string, name string, publicCertificateName string) (result autorest.Response, err error) { +// name - the name of the web app. +// namespaceName - the namespace for this hybrid connection. +// relayName - the relay name for this hybrid connection. +// slot - the name of the slot for the web app. +func (client AppsClient) DeleteHybridConnectionSlot(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeletePublicCertificate") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteHybridConnectionSlot") defer func() { sc := -1 if result.Response != nil { @@ -5842,37 +5859,39 @@ func (client AppsClient) DeletePublicCertificate(ctx context.Context, resourceGr 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", "DeletePublicCertificate", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteHybridConnectionSlot", err.Error()) } - req, err := client.DeletePublicCertificatePreparer(ctx, resourceGroupName, name, publicCertificateName) + req, err := client.DeleteHybridConnectionSlotPreparer(ctx, resourceGroupName, name, namespaceName, relayName, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePublicCertificate", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHybridConnectionSlot", nil, "Failure preparing request") return } - resp, err := client.DeletePublicCertificateSender(req) + resp, err := client.DeleteHybridConnectionSlotSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePublicCertificate", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHybridConnectionSlot", resp, "Failure sending request") return } - result, err = client.DeletePublicCertificateResponder(resp) + result, err = client.DeleteHybridConnectionSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePublicCertificate", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHybridConnectionSlot", resp, "Failure responding to request") } return } -// DeletePublicCertificatePreparer prepares the DeletePublicCertificate request. -func (client AppsClient) DeletePublicCertificatePreparer(ctx context.Context, resourceGroupName string, name string, publicCertificateName string) (*http.Request, error) { +// DeleteHybridConnectionSlotPreparer prepares the DeleteHybridConnectionSlot request. +func (client AppsClient) DeleteHybridConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "name": autorest.Encode("path", name), - "publicCertificateName": autorest.Encode("path", publicCertificateName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "name": autorest.Encode("path", name), + "namespaceName": autorest.Encode("path", namespaceName), + "relayName": autorest.Encode("path", relayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2019-08-01" @@ -5883,40 +5902,39 @@ func (client AppsClient) DeletePublicCertificatePreparer(ctx context.Context, re preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeletePublicCertificateSender sends the DeletePublicCertificate request. The method will close the +// DeleteHybridConnectionSlotSender sends the DeleteHybridConnectionSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeletePublicCertificateSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteHybridConnectionSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeletePublicCertificateResponder handles the response to the DeletePublicCertificate request. The method always +// DeleteHybridConnectionSlotResponder handles the response to the DeleteHybridConnectionSlot request. The method always // closes the http.Response Body. -func (client AppsClient) DeletePublicCertificateResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteHybridConnectionSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), autorest.ByClosing()) result.Response = resp return } -// DeletePublicCertificateSlot description for Deletes a hostname binding for an app. +// DeleteInstanceFunctionSlot description for Delete a function for web site, or a deployment slot. // 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 delete the binding for the -// production slot. -// publicCertificateName - public certificate name. -func (client AppsClient) DeletePublicCertificateSlot(ctx context.Context, resourceGroupName string, name string, slot string, publicCertificateName string) (result autorest.Response, err error) { +// name - site name. +// functionName - function name. +// slot - name of the deployment slot. +func (client AppsClient) DeleteInstanceFunctionSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeletePublicCertificateSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteInstanceFunctionSlot") defer func() { sc := -1 if result.Response != nil { @@ -5930,38 +5948,38 @@ func (client AppsClient) DeletePublicCertificateSlot(ctx context.Context, resour 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", "DeletePublicCertificateSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteInstanceFunctionSlot", err.Error()) } - req, err := client.DeletePublicCertificateSlotPreparer(ctx, resourceGroupName, name, slot, publicCertificateName) + req, err := client.DeleteInstanceFunctionSlotPreparer(ctx, resourceGroupName, name, functionName, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePublicCertificateSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceFunctionSlot", nil, "Failure preparing request") return } - resp, err := client.DeletePublicCertificateSlotSender(req) + resp, err := client.DeleteInstanceFunctionSlotSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePublicCertificateSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceFunctionSlot", resp, "Failure sending request") return } - result, err = client.DeletePublicCertificateSlotResponder(resp) + result, err = client.DeleteInstanceFunctionSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePublicCertificateSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceFunctionSlot", resp, "Failure responding to request") } return } -// DeletePublicCertificateSlotPreparer prepares the DeletePublicCertificateSlot request. -func (client AppsClient) DeletePublicCertificateSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, publicCertificateName string) (*http.Request, error) { +// DeleteInstanceFunctionSlotPreparer prepares the DeleteInstanceFunctionSlot request. +func (client AppsClient) DeleteInstanceFunctionSlotPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "name": autorest.Encode("path", name), - "publicCertificateName": autorest.Encode("path", publicCertificateName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "functionName": autorest.Encode("path", functionName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2019-08-01" @@ -5972,38 +5990,41 @@ func (client AppsClient) DeletePublicCertificateSlotPreparer(ctx context.Context preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeletePublicCertificateSlotSender sends the DeletePublicCertificateSlot request. The method will close the +// DeleteInstanceFunctionSlotSender sends the DeleteInstanceFunctionSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeletePublicCertificateSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteInstanceFunctionSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeletePublicCertificateSlotResponder handles the response to the DeletePublicCertificateSlot request. The method always +// DeleteInstanceFunctionSlotResponder handles the response to the DeleteInstanceFunctionSlot request. The method always // closes the http.Response Body. -func (client AppsClient) DeletePublicCertificateSlotResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteInstanceFunctionSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), autorest.ByClosing()) result.Response = resp return } -// DeleteRelayServiceConnection description for Deletes a relay service connection by its name. +// DeleteInstanceProcess description for Terminate a process by its ID for a web site, or a deployment slot, or +// specific scaled-out instance in a web site. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// entityName - name of the hybrid connection configuration. -func (client AppsClient) DeleteRelayServiceConnection(ctx context.Context, resourceGroupName string, name string, entityName string) (result autorest.Response, err error) { +// name - site name. +// processID - pID. +// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON +// response from "GET api/sites/{siteName}/instances". +func (client AppsClient) DeleteInstanceProcess(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteRelayServiceConnection") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteInstanceProcess") defer func() { sc := -1 if result.Response != nil { @@ -6017,35 +6038,36 @@ func (client AppsClient) DeleteRelayServiceConnection(ctx context.Context, resou 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", "DeleteRelayServiceConnection", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteInstanceProcess", err.Error()) } - req, err := client.DeleteRelayServiceConnectionPreparer(ctx, resourceGroupName, name, entityName) + req, err := client.DeleteInstanceProcessPreparer(ctx, resourceGroupName, name, processID, instanceID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteRelayServiceConnection", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceProcess", nil, "Failure preparing request") return } - resp, err := client.DeleteRelayServiceConnectionSender(req) + resp, err := client.DeleteInstanceProcessSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteRelayServiceConnection", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceProcess", resp, "Failure sending request") return } - result, err = client.DeleteRelayServiceConnectionResponder(resp) + result, err = client.DeleteInstanceProcessResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteRelayServiceConnection", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceProcess", resp, "Failure responding to request") } return } -// DeleteRelayServiceConnectionPreparer prepares the DeleteRelayServiceConnection request. -func (client AppsClient) DeleteRelayServiceConnectionPreparer(ctx context.Context, resourceGroupName string, name string, entityName string) (*http.Request, error) { +// DeleteInstanceProcessPreparer prepares the DeleteInstanceProcess request. +func (client AppsClient) DeleteInstanceProcessPreparer(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "entityName": autorest.Encode("path", entityName), + "instanceId": autorest.Encode("path", instanceID), "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -6058,40 +6080,43 @@ func (client AppsClient) DeleteRelayServiceConnectionPreparer(ctx context.Contex preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteRelayServiceConnectionSender sends the DeleteRelayServiceConnection request. The method will close the +// DeleteInstanceProcessSender sends the DeleteInstanceProcess request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteRelayServiceConnectionSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteInstanceProcessSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteRelayServiceConnectionResponder handles the response to the DeleteRelayServiceConnection request. The method always +// DeleteInstanceProcessResponder handles the response to the DeleteInstanceProcess request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteRelayServiceConnectionResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteInstanceProcessResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), autorest.ByClosing()) result.Response = resp return } -// DeleteRelayServiceConnectionSlot description for Deletes a relay service connection by its name. +// DeleteInstanceProcessSlot description for Terminate a process by its ID for a web site, or a deployment slot, or +// specific scaled-out instance in a web site. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// entityName - name of the hybrid connection configuration. -// slot - name of the deployment slot. If a slot is not specified, the API will delete a hybrid connection for -// the production slot. -func (client AppsClient) DeleteRelayServiceConnectionSlot(ctx context.Context, resourceGroupName string, name string, entityName string, slot string) (result autorest.Response, err error) { +// name - site name. +// processID - pID. +// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the +// production slot. +// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON +// response from "GET api/sites/{siteName}/instances". +func (client AppsClient) DeleteInstanceProcessSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteRelayServiceConnectionSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteInstanceProcessSlot") defer func() { sc := -1 if result.Response != nil { @@ -6105,35 +6130,36 @@ func (client AppsClient) DeleteRelayServiceConnectionSlot(ctx context.Context, r 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", "DeleteRelayServiceConnectionSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteInstanceProcessSlot", err.Error()) } - req, err := client.DeleteRelayServiceConnectionSlotPreparer(ctx, resourceGroupName, name, entityName, slot) + req, err := client.DeleteInstanceProcessSlotPreparer(ctx, resourceGroupName, name, processID, slot, instanceID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteRelayServiceConnectionSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceProcessSlot", nil, "Failure preparing request") return } - resp, err := client.DeleteRelayServiceConnectionSlotSender(req) + resp, err := client.DeleteInstanceProcessSlotSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteRelayServiceConnectionSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceProcessSlot", resp, "Failure sending request") return } - result, err = client.DeleteRelayServiceConnectionSlotResponder(resp) + result, err = client.DeleteInstanceProcessSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteRelayServiceConnectionSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceProcessSlot", resp, "Failure responding to request") } return } -// DeleteRelayServiceConnectionSlotPreparer prepares the DeleteRelayServiceConnectionSlot request. -func (client AppsClient) DeleteRelayServiceConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, entityName string, slot string) (*http.Request, error) { +// DeleteInstanceProcessSlotPreparer prepares the DeleteInstanceProcessSlot request. +func (client AppsClient) DeleteInstanceProcessSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "entityName": autorest.Encode("path", entityName), + "instanceId": autorest.Encode("path", instanceID), "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -6147,38 +6173,38 @@ func (client AppsClient) DeleteRelayServiceConnectionSlotPreparer(ctx context.Co preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteRelayServiceConnectionSlotSender sends the DeleteRelayServiceConnectionSlot request. The method will close the +// DeleteInstanceProcessSlotSender sends the DeleteInstanceProcessSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteRelayServiceConnectionSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteInstanceProcessSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteRelayServiceConnectionSlotResponder handles the response to the DeleteRelayServiceConnectionSlot request. The method always +// DeleteInstanceProcessSlotResponder handles the response to the DeleteInstanceProcessSlot request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteRelayServiceConnectionSlotResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteInstanceProcessSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), autorest.ByClosing()) result.Response = resp return } -// DeleteSiteExtension description for Remove a site extension from a web site, or a deployment slot. +// DeletePremierAddOn description for Delete a premier add-on from an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// siteExtensionID - site extension name. -func (client AppsClient) DeleteSiteExtension(ctx context.Context, resourceGroupName string, name string, siteExtensionID string) (result autorest.Response, err error) { +// name - name of the app. +// premierAddOnName - add-on name. +func (client AppsClient) DeletePremierAddOn(ctx context.Context, resourceGroupName string, name string, premierAddOnName string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteSiteExtension") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeletePremierAddOn") defer func() { sc := -1 if result.Response != nil { @@ -6192,36 +6218,36 @@ func (client AppsClient) DeleteSiteExtension(ctx context.Context, resourceGroupN 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", "DeleteSiteExtension", err.Error()) + return result, validation.NewError("web.AppsClient", "DeletePremierAddOn", err.Error()) } - req, err := client.DeleteSiteExtensionPreparer(ctx, resourceGroupName, name, siteExtensionID) + req, err := client.DeletePremierAddOnPreparer(ctx, resourceGroupName, name, premierAddOnName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSiteExtension", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePremierAddOn", nil, "Failure preparing request") return } - resp, err := client.DeleteSiteExtensionSender(req) + resp, err := client.DeletePremierAddOnSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSiteExtension", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePremierAddOn", resp, "Failure sending request") return } - result, err = client.DeleteSiteExtensionResponder(resp) + result, err = client.DeletePremierAddOnResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSiteExtension", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePremierAddOn", resp, "Failure responding to request") } return } -// DeleteSiteExtensionPreparer prepares the DeleteSiteExtension request. -func (client AppsClient) DeleteSiteExtensionPreparer(ctx context.Context, resourceGroupName string, name string, siteExtensionID string) (*http.Request, error) { +// DeletePremierAddOnPreparer prepares the DeletePremierAddOn request. +func (client AppsClient) DeletePremierAddOnPreparer(ctx context.Context, resourceGroupName string, name string, premierAddOnName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), + "premierAddOnName": autorest.Encode("path", premierAddOnName), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "siteExtensionId": autorest.Encode("path", siteExtensionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -6233,40 +6259,40 @@ func (client AppsClient) DeleteSiteExtensionPreparer(ctx context.Context, resour preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteSiteExtensionSender sends the DeleteSiteExtension request. The method will close the +// DeletePremierAddOnSender sends the DeletePremierAddOn request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteSiteExtensionSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeletePremierAddOnSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteSiteExtensionResponder handles the response to the DeleteSiteExtension request. The method always +// DeletePremierAddOnResponder handles the response to the DeletePremierAddOn request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteSiteExtensionResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeletePremierAddOnResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByClosing()) result.Response = resp return } -// DeleteSiteExtensionSlot description for Remove a site extension from a web site, or a deployment slot. +// DeletePremierAddOnSlot description for Delete a premier add-on from an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// siteExtensionID - site extension name. -// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the +// name - name of the app. +// premierAddOnName - add-on name. +// slot - name of the deployment slot. If a slot is not specified, the API will delete the named add-on for the // production slot. -func (client AppsClient) DeleteSiteExtensionSlot(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string) (result autorest.Response, err error) { +func (client AppsClient) DeletePremierAddOnSlot(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteSiteExtensionSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeletePremierAddOnSlot") defer func() { sc := -1 if result.Response != nil { @@ -6280,36 +6306,36 @@ func (client AppsClient) DeleteSiteExtensionSlot(ctx context.Context, resourceGr 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", "DeleteSiteExtensionSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "DeletePremierAddOnSlot", err.Error()) } - req, err := client.DeleteSiteExtensionSlotPreparer(ctx, resourceGroupName, name, siteExtensionID, slot) + req, err := client.DeletePremierAddOnSlotPreparer(ctx, resourceGroupName, name, premierAddOnName, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSiteExtensionSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePremierAddOnSlot", nil, "Failure preparing request") return } - resp, err := client.DeleteSiteExtensionSlotSender(req) + resp, err := client.DeletePremierAddOnSlotSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSiteExtensionSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePremierAddOnSlot", resp, "Failure sending request") return } - result, err = client.DeleteSiteExtensionSlotResponder(resp) + result, err = client.DeletePremierAddOnSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSiteExtensionSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePremierAddOnSlot", resp, "Failure responding to request") } return } -// DeleteSiteExtensionSlotPreparer prepares the DeleteSiteExtensionSlot request. -func (client AppsClient) DeleteSiteExtensionSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string) (*http.Request, error) { +// DeletePremierAddOnSlotPreparer prepares the DeletePremierAddOnSlot request. +func (client AppsClient) DeletePremierAddOnSlotPreparer(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), + "premierAddOnName": autorest.Encode("path", premierAddOnName), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "siteExtensionId": autorest.Encode("path", siteExtensionID), "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -6322,41 +6348,39 @@ func (client AppsClient) DeleteSiteExtensionSlotPreparer(ctx context.Context, re preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteSiteExtensionSlotSender sends the DeleteSiteExtensionSlot request. The method will close the +// DeletePremierAddOnSlotSender sends the DeletePremierAddOnSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteSiteExtensionSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeletePremierAddOnSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteSiteExtensionSlotResponder handles the response to the DeleteSiteExtensionSlot request. The method always +// DeletePremierAddOnSlotResponder handles the response to the DeletePremierAddOnSlot request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteSiteExtensionSlotResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeletePremierAddOnSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByClosing()) result.Response = resp return } -// DeleteSlot description for Deletes a web, mobile, or API app, or one of the deployment slots. +// DeleteProcess description for Terminate a process by its ID for a web site, or a deployment slot, or specific +// scaled-out instance in a web site. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app to delete. -// slot - name of the deployment slot to delete. By default, the API deletes the production slot. -// deleteMetrics - if true, web app metrics are also deleted. -// deleteEmptyServerFarm - specify true if the App Service plan will be empty after app deletion and you want -// to delete the empty App Service plan. By default, the empty App Service plan is not deleted. -func (client AppsClient) DeleteSlot(ctx context.Context, resourceGroupName string, name string, slot string, deleteMetrics *bool, deleteEmptyServerFarm *bool) (result autorest.Response, err error) { +// name - site name. +// processID - pID. +func (client AppsClient) DeleteProcess(ctx context.Context, resourceGroupName string, name string, processID string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteProcess") defer func() { sc := -1 if result.Response != nil { @@ -6370,36 +6394,36 @@ func (client AppsClient) DeleteSlot(ctx context.Context, resourceGroupName strin 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", "DeleteSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteProcess", err.Error()) } - req, err := client.DeleteSlotPreparer(ctx, resourceGroupName, name, slot, deleteMetrics, deleteEmptyServerFarm) + req, err := client.DeleteProcessPreparer(ctx, resourceGroupName, name, processID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteProcess", nil, "Failure preparing request") return } - resp, err := client.DeleteSlotSender(req) + resp, err := client.DeleteProcessSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteProcess", resp, "Failure sending request") return } - result, err = client.DeleteSlotResponder(resp) + result, err = client.DeleteProcessResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteProcess", resp, "Failure responding to request") } return } -// DeleteSlotPreparer prepares the DeleteSlot request. -func (client AppsClient) DeleteSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, deleteMetrics *bool, deleteEmptyServerFarm *bool) (*http.Request, error) { +// DeleteProcessPreparer prepares the DeleteProcess request. +func (client AppsClient) DeleteProcessPreparer(ctx context.Context, resourceGroupName string, name string, processID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -6407,31 +6431,25 @@ func (client AppsClient) DeleteSlotPreparer(ctx context.Context, resourceGroupNa queryParameters := map[string]interface{}{ "api-version": APIVersion, } - if deleteMetrics != nil { - queryParameters["deleteMetrics"] = autorest.Encode("query", *deleteMetrics) - } - if deleteEmptyServerFarm != nil { - queryParameters["deleteEmptyServerFarm"] = autorest.Encode("query", *deleteEmptyServerFarm) - } preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteSlotSender sends the DeleteSlot request. The method will close the +// DeleteProcessSender sends the DeleteProcess request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteProcessSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteSlotResponder handles the response to the DeleteSlot request. The method always +// DeleteProcessResponder handles the response to the DeleteProcess request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteSlotResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteProcessResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -6441,13 +6459,17 @@ func (client AppsClient) DeleteSlotResponder(resp *http.Response) (result autore return } -// DeleteSourceControl description for Deletes the source control configuration of an app. +// DeleteProcessSlot description for Terminate a process by its ID for a web site, or a deployment slot, or specific +// scaled-out instance in a web site. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -func (client AppsClient) DeleteSourceControl(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) { +// name - site name. +// processID - pID. +// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the +// production slot. +func (client AppsClient) DeleteProcessSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteSourceControl") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteProcessSlot") defer func() { sc := -1 if result.Response != nil { @@ -6461,35 +6483,37 @@ func (client AppsClient) DeleteSourceControl(ctx context.Context, resourceGroupN 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", "DeleteSourceControl", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteProcessSlot", err.Error()) } - req, err := client.DeleteSourceControlPreparer(ctx, resourceGroupName, name) + req, err := client.DeleteProcessSlotPreparer(ctx, resourceGroupName, name, processID, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSourceControl", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteProcessSlot", nil, "Failure preparing request") return } - resp, err := client.DeleteSourceControlSender(req) + resp, err := client.DeleteProcessSlotSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSourceControl", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteProcessSlot", resp, "Failure sending request") return } - result, err = client.DeleteSourceControlResponder(resp) + result, err = client.DeleteProcessSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSourceControl", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteProcessSlot", resp, "Failure responding to request") } return } -// DeleteSourceControlPreparer prepares the DeleteSourceControl request. -func (client AppsClient) DeleteSourceControlPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// DeleteProcessSlotPreparer prepares the DeleteProcessSlot request. +func (client AppsClient) DeleteProcessSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -6501,39 +6525,38 @@ func (client AppsClient) DeleteSourceControlPreparer(ctx context.Context, resour preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteSourceControlSender sends the DeleteSourceControl request. The method will close the +// DeleteProcessSlotSender sends the DeleteProcessSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteSourceControlSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteProcessSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteSourceControlResponder handles the response to the DeleteSourceControl request. The method always +// DeleteProcessSlotResponder handles the response to the DeleteProcessSlot request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteSourceControlResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteProcessSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), autorest.ByClosing()) result.Response = resp return } -// DeleteSourceControlSlot description for Deletes the source control configuration of an app. +// DeletePublicCertificate description for Deletes a hostname binding for 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 delete the source control -// configuration for the production slot. -func (client AppsClient) DeleteSourceControlSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) { +// publicCertificateName - public certificate name. +func (client AppsClient) DeletePublicCertificate(ctx context.Context, resourceGroupName string, name string, publicCertificateName string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteSourceControlSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeletePublicCertificate") defer func() { sc := -1 if result.Response != nil { @@ -6547,38 +6570,38 @@ func (client AppsClient) DeleteSourceControlSlot(ctx context.Context, resourceGr 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", "DeleteSourceControlSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "DeletePublicCertificate", err.Error()) } - req, err := client.DeleteSourceControlSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.DeletePublicCertificatePreparer(ctx, resourceGroupName, name, publicCertificateName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSourceControlSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePublicCertificate", nil, "Failure preparing request") return } - resp, err := client.DeleteSourceControlSlotSender(req) + resp, err := client.DeletePublicCertificateSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSourceControlSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePublicCertificate", resp, "Failure sending request") return } - result, err = client.DeleteSourceControlSlotResponder(resp) + result, err = client.DeletePublicCertificateResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSourceControlSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePublicCertificate", resp, "Failure responding to request") } return } -// DeleteSourceControlSlotPreparer prepares the DeleteSourceControlSlot request. -func (client AppsClient) DeleteSourceControlSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// DeletePublicCertificatePreparer prepares the DeletePublicCertificate request. +func (client AppsClient) DeletePublicCertificatePreparer(ctx context.Context, resourceGroupName string, name string, publicCertificateName 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), - } + "name": autorest.Encode("path", name), + "publicCertificateName": autorest.Encode("path", publicCertificateName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } const APIVersion = "2019-08-01" queryParameters := map[string]interface{}{ @@ -6588,38 +6611,40 @@ func (client AppsClient) DeleteSourceControlSlotPreparer(ctx context.Context, re preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteSourceControlSlotSender sends the DeleteSourceControlSlot request. The method will close the +// DeletePublicCertificateSender sends the DeletePublicCertificate request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteSourceControlSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeletePublicCertificateSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteSourceControlSlotResponder handles the response to the DeleteSourceControlSlot request. The method always +// DeletePublicCertificateResponder handles the response to the DeletePublicCertificate request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteSourceControlSlotResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeletePublicCertificateResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) result.Response = resp return } -// DeleteSwiftVirtualNetwork description for Deletes a Swift Virtual Network connection from an app (or deployment -// slot). +// DeletePublicCertificateSlot description for Deletes a hostname binding for an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -func (client AppsClient) DeleteSwiftVirtualNetwork(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) { +// slot - name of the deployment slot. If a slot is not specified, the API will delete the binding for the +// production slot. +// publicCertificateName - public certificate name. +func (client AppsClient) DeletePublicCertificateSlot(ctx context.Context, resourceGroupName string, name string, slot string, publicCertificateName string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteSwiftVirtualNetwork") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeletePublicCertificateSlot") defer func() { sc := -1 if result.Response != nil { @@ -6633,36 +6658,38 @@ func (client AppsClient) DeleteSwiftVirtualNetwork(ctx context.Context, resource 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", "DeleteSwiftVirtualNetwork", err.Error()) + return result, validation.NewError("web.AppsClient", "DeletePublicCertificateSlot", err.Error()) } - req, err := client.DeleteSwiftVirtualNetworkPreparer(ctx, resourceGroupName, name) + req, err := client.DeletePublicCertificateSlotPreparer(ctx, resourceGroupName, name, slot, publicCertificateName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSwiftVirtualNetwork", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePublicCertificateSlot", nil, "Failure preparing request") return } - resp, err := client.DeleteSwiftVirtualNetworkSender(req) + resp, err := client.DeletePublicCertificateSlotSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSwiftVirtualNetwork", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePublicCertificateSlot", resp, "Failure sending request") return } - result, err = client.DeleteSwiftVirtualNetworkResponder(resp) + result, err = client.DeletePublicCertificateSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSwiftVirtualNetwork", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePublicCertificateSlot", resp, "Failure responding to request") } return } -// DeleteSwiftVirtualNetworkPreparer prepares the DeleteSwiftVirtualNetwork request. -func (client AppsClient) DeleteSwiftVirtualNetworkPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// DeletePublicCertificateSlotPreparer prepares the DeletePublicCertificateSlot request. +func (client AppsClient) DeletePublicCertificateSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, publicCertificateName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "name": autorest.Encode("path", name), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "name": autorest.Encode("path", name), + "publicCertificateName": autorest.Encode("path", publicCertificateName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2019-08-01" @@ -6673,40 +6700,38 @@ func (client AppsClient) DeleteSwiftVirtualNetworkPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteSwiftVirtualNetworkSender sends the DeleteSwiftVirtualNetwork request. The method will close the +// DeletePublicCertificateSlotSender sends the DeletePublicCertificateSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteSwiftVirtualNetworkSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeletePublicCertificateSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteSwiftVirtualNetworkResponder handles the response to the DeleteSwiftVirtualNetwork request. The method always +// DeletePublicCertificateSlotResponder handles the response to the DeletePublicCertificateSlot request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteSwiftVirtualNetworkResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeletePublicCertificateSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) result.Response = resp return } -// DeleteSwiftVirtualNetworkSlot description for Deletes a Swift Virtual Network connection from an app (or deployment -// slot). +// DeleteRelayServiceConnection description for Deletes a relay service connection by its name. // 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 delete the connection for the -// production slot. -func (client AppsClient) DeleteSwiftVirtualNetworkSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) { +// entityName - name of the hybrid connection configuration. +func (client AppsClient) DeleteRelayServiceConnection(ctx context.Context, resourceGroupName string, name string, entityName string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteSwiftVirtualNetworkSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteRelayServiceConnection") defer func() { sc := -1 if result.Response != nil { @@ -6720,36 +6745,36 @@ func (client AppsClient) DeleteSwiftVirtualNetworkSlot(ctx context.Context, reso 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", "DeleteSwiftVirtualNetworkSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteRelayServiceConnection", err.Error()) } - req, err := client.DeleteSwiftVirtualNetworkSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.DeleteRelayServiceConnectionPreparer(ctx, resourceGroupName, name, entityName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSwiftVirtualNetworkSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteRelayServiceConnection", nil, "Failure preparing request") return } - resp, err := client.DeleteSwiftVirtualNetworkSlotSender(req) + resp, err := client.DeleteRelayServiceConnectionSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSwiftVirtualNetworkSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteRelayServiceConnection", resp, "Failure sending request") return } - result, err = client.DeleteSwiftVirtualNetworkSlotResponder(resp) + result, err = client.DeleteRelayServiceConnectionResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSwiftVirtualNetworkSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteRelayServiceConnection", resp, "Failure responding to request") } return } -// DeleteSwiftVirtualNetworkSlotPreparer prepares the DeleteSwiftVirtualNetworkSlot request. -func (client AppsClient) DeleteSwiftVirtualNetworkSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// DeleteRelayServiceConnectionPreparer prepares the DeleteRelayServiceConnection request. +func (client AppsClient) DeleteRelayServiceConnectionPreparer(ctx context.Context, resourceGroupName string, name string, entityName string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "entityName": autorest.Encode("path", entityName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -6761,21 +6786,21 @@ func (client AppsClient) DeleteSwiftVirtualNetworkSlotPreparer(ctx context.Conte preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteSwiftVirtualNetworkSlotSender sends the DeleteSwiftVirtualNetworkSlot request. The method will close the +// DeleteRelayServiceConnectionSender sends the DeleteRelayServiceConnection request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteSwiftVirtualNetworkSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteRelayServiceConnectionSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteSwiftVirtualNetworkSlotResponder handles the response to the DeleteSwiftVirtualNetworkSlot request. The method always +// DeleteRelayServiceConnectionResponder handles the response to the DeleteRelayServiceConnection request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteSwiftVirtualNetworkSlotResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteRelayServiceConnectionResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -6785,14 +6810,16 @@ func (client AppsClient) DeleteSwiftVirtualNetworkSlotResponder(resp *http.Respo return } -// DeleteTriggeredWebJob description for Delete a triggered web job by its ID for an app, or a deployment slot. +// DeleteRelayServiceConnectionSlot description for Deletes a relay service connection by its name. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// webJobName - name of Web Job. -func (client AppsClient) DeleteTriggeredWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string) (result autorest.Response, err error) { +// name - name of the app. +// entityName - name of the hybrid connection configuration. +// slot - name of the deployment slot. If a slot is not specified, the API will delete a hybrid connection for +// the production slot. +func (client AppsClient) DeleteRelayServiceConnectionSlot(ctx context.Context, resourceGroupName string, name string, entityName string, slot string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteTriggeredWebJob") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteRelayServiceConnectionSlot") defer func() { sc := -1 if result.Response != nil { @@ -6806,37 +6833,38 @@ func (client AppsClient) DeleteTriggeredWebJob(ctx context.Context, resourceGrou 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", "DeleteTriggeredWebJob", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteRelayServiceConnectionSlot", err.Error()) } - req, err := client.DeleteTriggeredWebJobPreparer(ctx, resourceGroupName, name, webJobName) + req, err := client.DeleteRelayServiceConnectionSlotPreparer(ctx, resourceGroupName, name, entityName, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJob", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteRelayServiceConnectionSlot", nil, "Failure preparing request") return } - resp, err := client.DeleteTriggeredWebJobSender(req) + resp, err := client.DeleteRelayServiceConnectionSlotSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJob", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteRelayServiceConnectionSlot", resp, "Failure sending request") return } - result, err = client.DeleteTriggeredWebJobResponder(resp) + result, err = client.DeleteRelayServiceConnectionSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJob", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteRelayServiceConnectionSlot", resp, "Failure responding to request") } return } -// DeleteTriggeredWebJobPreparer prepares the DeleteTriggeredWebJob request. -func (client AppsClient) DeleteTriggeredWebJobPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string) (*http.Request, error) { +// DeleteRelayServiceConnectionSlotPreparer prepares the DeleteRelayServiceConnectionSlot request. +func (client AppsClient) DeleteRelayServiceConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, entityName string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "entityName": autorest.Encode("path", entityName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "webJobName": autorest.Encode("path", webJobName), } const APIVersion = "2019-08-01" @@ -6847,40 +6875,38 @@ func (client AppsClient) DeleteTriggeredWebJobPreparer(ctx context.Context, reso preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteTriggeredWebJobSender sends the DeleteTriggeredWebJob request. The method will close the +// DeleteRelayServiceConnectionSlotSender sends the DeleteRelayServiceConnectionSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteTriggeredWebJobSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteRelayServiceConnectionSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteTriggeredWebJobResponder handles the response to the DeleteTriggeredWebJob request. The method always +// DeleteRelayServiceConnectionSlotResponder handles the response to the DeleteRelayServiceConnectionSlot request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteTriggeredWebJobResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteRelayServiceConnectionSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), autorest.ByClosing()) result.Response = resp return } -// DeleteTriggeredWebJobSlot description for Delete a triggered web job by its ID for an app, or a deployment slot. +// DeleteSiteExtension description for Remove a site extension from a web site, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - site name. -// webJobName - name of Web Job. -// slot - name of the deployment slot. If a slot is not specified, the API deletes web job for the production -// slot. -func (client AppsClient) DeleteTriggeredWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result autorest.Response, err error) { +// siteExtensionID - site extension name. +func (client AppsClient) DeleteSiteExtension(ctx context.Context, resourceGroupName string, name string, siteExtensionID string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteTriggeredWebJobSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteSiteExtension") defer func() { sc := -1 if result.Response != nil { @@ -6894,38 +6920,37 @@ func (client AppsClient) DeleteTriggeredWebJobSlot(ctx context.Context, resource 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", "DeleteTriggeredWebJobSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteSiteExtension", err.Error()) } - req, err := client.DeleteTriggeredWebJobSlotPreparer(ctx, resourceGroupName, name, webJobName, slot) + req, err := client.DeleteSiteExtensionPreparer(ctx, resourceGroupName, name, siteExtensionID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJobSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSiteExtension", nil, "Failure preparing request") return } - resp, err := client.DeleteTriggeredWebJobSlotSender(req) + resp, err := client.DeleteSiteExtensionSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJobSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSiteExtension", resp, "Failure sending request") return } - result, err = client.DeleteTriggeredWebJobSlotResponder(resp) + result, err = client.DeleteSiteExtensionResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJobSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSiteExtension", resp, "Failure responding to request") } return } -// DeleteTriggeredWebJobSlotPreparer prepares the DeleteTriggeredWebJobSlot request. -func (client AppsClient) DeleteTriggeredWebJobSlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (*http.Request, error) { +// DeleteSiteExtensionPreparer prepares the DeleteSiteExtension request. +func (client AppsClient) DeleteSiteExtensionPreparer(ctx context.Context, resourceGroupName string, name string, siteExtensionID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), + "siteExtensionId": autorest.Encode("path", siteExtensionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "webJobName": autorest.Encode("path", webJobName), } const APIVersion = "2019-08-01" @@ -6936,39 +6961,40 @@ func (client AppsClient) DeleteTriggeredWebJobSlotPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteTriggeredWebJobSlotSender sends the DeleteTriggeredWebJobSlot request. The method will close the +// DeleteSiteExtensionSender sends the DeleteSiteExtension request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteTriggeredWebJobSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteSiteExtensionSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteTriggeredWebJobSlotResponder handles the response to the DeleteTriggeredWebJobSlot request. The method always +// DeleteSiteExtensionResponder handles the response to the DeleteSiteExtension request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteTriggeredWebJobSlotResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteSiteExtensionResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), autorest.ByClosing()) result.Response = resp return } -// DeleteVnetConnection description for Deletes a connection from an app (or deployment slot to a named virtual -// network. +// DeleteSiteExtensionSlot description for Remove a site extension from a web site, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// vnetName - name of the virtual network. -func (client AppsClient) DeleteVnetConnection(ctx context.Context, resourceGroupName string, name string, vnetName string) (result autorest.Response, err error) { +// name - site name. +// siteExtensionID - site extension name. +// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the +// production slot. +func (client AppsClient) DeleteSiteExtensionSlot(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteVnetConnection") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteSiteExtensionSlot") defer func() { sc := -1 if result.Response != nil { @@ -6982,37 +7008,38 @@ func (client AppsClient) DeleteVnetConnection(ctx context.Context, resourceGroup 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", "DeleteVnetConnection", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteSiteExtensionSlot", err.Error()) } - req, err := client.DeleteVnetConnectionPreparer(ctx, resourceGroupName, name, vnetName) + req, err := client.DeleteSiteExtensionSlotPreparer(ctx, resourceGroupName, name, siteExtensionID, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteVnetConnection", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSiteExtensionSlot", nil, "Failure preparing request") return } - resp, err := client.DeleteVnetConnectionSender(req) + resp, err := client.DeleteSiteExtensionSlotSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteVnetConnection", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSiteExtensionSlot", resp, "Failure sending request") return } - result, err = client.DeleteVnetConnectionResponder(resp) + result, err = client.DeleteSiteExtensionSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteVnetConnection", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSiteExtensionSlot", resp, "Failure responding to request") } return } -// DeleteVnetConnectionPreparer prepares the DeleteVnetConnection request. -func (client AppsClient) DeleteVnetConnectionPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string) (*http.Request, error) { +// DeleteSiteExtensionSlotPreparer prepares the DeleteSiteExtensionSlot request. +func (client AppsClient) DeleteSiteExtensionSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "siteExtensionId": autorest.Encode("path", siteExtensionID), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vnetName": autorest.Encode("path", vnetName), } const APIVersion = "2019-08-01" @@ -7023,41 +7050,41 @@ func (client AppsClient) DeleteVnetConnectionPreparer(ctx context.Context, resou preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteVnetConnectionSender sends the DeleteVnetConnection request. The method will close the +// DeleteSiteExtensionSlotSender sends the DeleteSiteExtensionSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteVnetConnectionSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteSiteExtensionSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteVnetConnectionResponder handles the response to the DeleteVnetConnection request. The method always +// DeleteSiteExtensionSlotResponder handles the response to the DeleteSiteExtensionSlot request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteVnetConnectionResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteSiteExtensionSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), autorest.ByClosing()) result.Response = resp return } -// DeleteVnetConnectionSlot description for Deletes a connection from an app (or deployment slot to a named virtual -// network. +// DeleteSlot description for Deletes a web, mobile, or API app, or one of the deployment slots. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// vnetName - name of the virtual network. -// slot - name of the deployment slot. If a slot is not specified, the API will delete the connection for the -// production slot. -func (client AppsClient) DeleteVnetConnectionSlot(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string) (result autorest.Response, err error) { +// name - name of the app to delete. +// slot - name of the deployment slot to delete. By default, the API deletes the production slot. +// deleteMetrics - if true, web app metrics are also deleted. +// deleteEmptyServerFarm - specify true if the App Service plan will be empty after app deletion and you want +// to delete the empty App Service plan. By default, the empty App Service plan is not deleted. +func (client AppsClient) DeleteSlot(ctx context.Context, resourceGroupName string, name string, slot string, deleteMetrics *bool, deleteEmptyServerFarm *bool) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteVnetConnectionSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteSlot") defer func() { sc := -1 if result.Response != nil { @@ -7071,85 +7098,88 @@ func (client AppsClient) DeleteVnetConnectionSlot(ctx context.Context, resourceG 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", "DeleteVnetConnectionSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteSlot", err.Error()) } - req, err := client.DeleteVnetConnectionSlotPreparer(ctx, resourceGroupName, name, vnetName, slot) + req, err := client.DeleteSlotPreparer(ctx, resourceGroupName, name, slot, deleteMetrics, deleteEmptyServerFarm) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteVnetConnectionSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSlot", nil, "Failure preparing request") return } - resp, err := client.DeleteVnetConnectionSlotSender(req) + resp, err := client.DeleteSlotSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteVnetConnectionSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSlot", resp, "Failure sending request") return } - result, err = client.DeleteVnetConnectionSlotResponder(resp) + result, err = client.DeleteSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteVnetConnectionSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSlot", resp, "Failure responding to request") } return } -// DeleteVnetConnectionSlotPreparer prepares the DeleteVnetConnectionSlot request. -func (client AppsClient) DeleteVnetConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string) (*http.Request, error) { +// DeleteSlotPreparer prepares the DeleteSlot request. +func (client AppsClient) DeleteSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, deleteMetrics *bool, deleteEmptyServerFarm *bool) (*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), - "vnetName": autorest.Encode("path", vnetName), } const APIVersion = "2019-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + if deleteMetrics != nil { + queryParameters["deleteMetrics"] = autorest.Encode("query", *deleteMetrics) + } + if deleteEmptyServerFarm != nil { + queryParameters["deleteEmptyServerFarm"] = autorest.Encode("query", *deleteEmptyServerFarm) + } preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DeleteVnetConnectionSlotSender sends the DeleteVnetConnectionSlot request. The method will close the +// DeleteSlotSender sends the DeleteSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteVnetConnectionSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DeleteVnetConnectionSlotResponder handles the response to the DeleteVnetConnectionSlot request. The method always +// DeleteSlotResponder handles the response to the DeleteSlot request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteVnetConnectionSlotResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), autorest.ByClosing()) result.Response = resp return } -// DiscoverBackup description for Discovers an existing app backup that can be restored from a blob in Azure storage. -// Use this to get information about the databases stored in a backup. +// DeleteSourceControl description for Deletes the source control configuration of an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// request - a RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. -func (client AppsClient) DiscoverBackup(ctx context.Context, resourceGroupName string, name string, request RestoreRequest) (result RestoreRequest, err error) { +func (client AppsClient) DeleteSourceControl(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DiscoverBackup") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteSourceControl") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.Response != nil { + sc = result.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -7158,38 +7188,33 @@ func (client AppsClient) DiscoverBackup(ctx context.Context, resourceGroupName s {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: request, - Constraints: []validation.Constraint{{Target: "request.RestoreRequestProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "request.RestoreRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "request.RestoreRequestProperties.Overwrite", Name: validation.Null, Rule: true, Chain: nil}, - }}}}}); err != nil { - return result, validation.NewError("web.AppsClient", "DiscoverBackup", err.Error()) + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "DeleteSourceControl", err.Error()) } - req, err := client.DiscoverBackupPreparer(ctx, resourceGroupName, name, request) + req, err := client.DeleteSourceControlPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DiscoverBackup", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSourceControl", nil, "Failure preparing request") return } - resp, err := client.DiscoverBackupSender(req) + resp, err := client.DeleteSourceControlSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "DiscoverBackup", resp, "Failure sending request") + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSourceControl", resp, "Failure sending request") return } - result, err = client.DiscoverBackupResponder(resp) + result, err = client.DeleteSourceControlResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DiscoverBackup", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSourceControl", resp, "Failure responding to request") } return } -// DiscoverBackupPreparer prepares the DiscoverBackup request. -func (client AppsClient) DiscoverBackupPreparer(ctx context.Context, resourceGroupName string, name string, request RestoreRequest) (*http.Request, error) { +// DeleteSourceControlPreparer prepares the DeleteSourceControl request. +func (client AppsClient) DeleteSourceControlPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -7202,50 +7227,45 @@ func (client AppsClient) DiscoverBackupPreparer(ctx context.Context, resourceGro } preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), + autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup", pathParameters), - autorest.WithJSON(request), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DiscoverBackupSender sends the DiscoverBackup request. The method will close the +// DeleteSourceControlSender sends the DeleteSourceControl request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DiscoverBackupSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteSourceControlSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DiscoverBackupResponder handles the response to the DiscoverBackup request. The method always +// DeleteSourceControlResponder handles the response to the DeleteSourceControl request. The method always // closes the http.Response Body. -func (client AppsClient) DiscoverBackupResponder(resp *http.Response) (result RestoreRequest, err error) { +func (client AppsClient) DeleteSourceControlResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNotFound), autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} + result.Response = resp return } -// DiscoverBackupSlot description for Discovers an existing app backup that can be restored from a blob in Azure -// storage. Use this to get information about the databases stored in a backup. +// DeleteSourceControlSlot description for Deletes the source control configuration of an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// request - a RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. -// slot - name of the deployment slot. If a slot is not specified, the API will perform discovery for the -// production slot. -func (client AppsClient) DiscoverBackupSlot(ctx context.Context, resourceGroupName string, name string, request RestoreRequest, slot string) (result RestoreRequest, err error) { +// slot - name of the deployment slot. If a slot is not specified, the API will delete the source control +// configuration for the production slot. +func (client AppsClient) DeleteSourceControlSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DiscoverBackupSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteSourceControlSlot") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.Response != nil { + sc = result.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -7254,38 +7274,33 @@ func (client AppsClient) DiscoverBackupSlot(ctx context.Context, resourceGroupNa {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: request, - Constraints: []validation.Constraint{{Target: "request.RestoreRequestProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "request.RestoreRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "request.RestoreRequestProperties.Overwrite", Name: validation.Null, Rule: true, Chain: nil}, - }}}}}); err != nil { - return result, validation.NewError("web.AppsClient", "DiscoverBackupSlot", err.Error()) + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "DeleteSourceControlSlot", err.Error()) } - req, err := client.DiscoverBackupSlotPreparer(ctx, resourceGroupName, name, request, slot) + req, err := client.DeleteSourceControlSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DiscoverBackupSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSourceControlSlot", nil, "Failure preparing request") return } - resp, err := client.DiscoverBackupSlotSender(req) + resp, err := client.DeleteSourceControlSlotSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "DiscoverBackupSlot", resp, "Failure sending request") + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSourceControlSlot", resp, "Failure sending request") return } - result, err = client.DiscoverBackupSlotResponder(resp) + result, err = client.DeleteSourceControlSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DiscoverBackupSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSourceControlSlot", resp, "Failure responding to request") } return } -// DiscoverBackupSlotPreparer prepares the DiscoverBackupSlot request. -func (client AppsClient) DiscoverBackupSlotPreparer(ctx context.Context, resourceGroupName string, name string, request RestoreRequest, slot string) (*http.Request, error) { +// DeleteSourceControlSlotPreparer prepares the DeleteSourceControlSlot request. +func (client AppsClient) DeleteSourceControlSlotPreparer(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), @@ -7299,43 +7314,40 @@ func (client AppsClient) DiscoverBackupSlotPreparer(ctx context.Context, resourc } preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), + autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup", pathParameters), - autorest.WithJSON(request), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// DiscoverBackupSlotSender sends the DiscoverBackupSlot request. The method will close the +// DeleteSourceControlSlotSender sends the DeleteSourceControlSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DiscoverBackupSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteSourceControlSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// DiscoverBackupSlotResponder handles the response to the DiscoverBackupSlot request. The method always +// DeleteSourceControlSlotResponder handles the response to the DeleteSourceControlSlot request. The method always // closes the http.Response Body. -func (client AppsClient) DiscoverBackupSlotResponder(resp *http.Response) (result RestoreRequest, err error) { +func (client AppsClient) DeleteSourceControlSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNotFound), autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} + result.Response = resp return } -// GenerateNewSitePublishingPassword description for Generates a new publishing password for an app (or deployment -// slot, if specified). +// DeleteSwiftVirtualNetwork description for Deletes a Swift Virtual Network connection from an app (or deployment +// slot). // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -func (client AppsClient) GenerateNewSitePublishingPassword(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) { +func (client AppsClient) DeleteSwiftVirtualNetwork(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GenerateNewSitePublishingPassword") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteSwiftVirtualNetwork") defer func() { sc := -1 if result.Response != nil { @@ -7349,32 +7361,32 @@ func (client AppsClient) GenerateNewSitePublishingPassword(ctx context.Context, 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", "GenerateNewSitePublishingPassword", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteSwiftVirtualNetwork", err.Error()) } - req, err := client.GenerateNewSitePublishingPasswordPreparer(ctx, resourceGroupName, name) + req, err := client.DeleteSwiftVirtualNetworkPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GenerateNewSitePublishingPassword", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSwiftVirtualNetwork", nil, "Failure preparing request") return } - resp, err := client.GenerateNewSitePublishingPasswordSender(req) + resp, err := client.DeleteSwiftVirtualNetworkSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "GenerateNewSitePublishingPassword", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSwiftVirtualNetwork", resp, "Failure sending request") return } - result, err = client.GenerateNewSitePublishingPasswordResponder(resp) + result, err = client.DeleteSwiftVirtualNetworkResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GenerateNewSitePublishingPassword", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSwiftVirtualNetwork", resp, "Failure responding to request") } return } -// GenerateNewSitePublishingPasswordPreparer prepares the GenerateNewSitePublishingPassword request. -func (client AppsClient) GenerateNewSitePublishingPasswordPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// DeleteSwiftVirtualNetworkPreparer prepares the DeleteSwiftVirtualNetwork request. +func (client AppsClient) DeleteSwiftVirtualNetworkPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -7387,42 +7399,42 @@ func (client AppsClient) GenerateNewSitePublishingPasswordPreparer(ctx context.C } preparer := autorest.CreatePreparer( - autorest.AsPost(), + autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GenerateNewSitePublishingPasswordSender sends the GenerateNewSitePublishingPassword request. The method will close the +// DeleteSwiftVirtualNetworkSender sends the DeleteSwiftVirtualNetwork request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GenerateNewSitePublishingPasswordSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteSwiftVirtualNetworkSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GenerateNewSitePublishingPasswordResponder handles the response to the GenerateNewSitePublishingPassword request. The method always +// DeleteSwiftVirtualNetworkResponder handles the response to the DeleteSwiftVirtualNetwork request. The method always // closes the http.Response Body. -func (client AppsClient) GenerateNewSitePublishingPasswordResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteSwiftVirtualNetworkResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), autorest.ByClosing()) result.Response = resp return } -// GenerateNewSitePublishingPasswordSlot description for Generates a new publishing password for an app (or deployment -// slot, if specified). +// DeleteSwiftVirtualNetworkSlot description for Deletes a Swift Virtual Network connection from an app (or deployment +// slot). // 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 generate a new publishing password -// for the production slot. -func (client AppsClient) GenerateNewSitePublishingPasswordSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) { +// slot - name of the deployment slot. If a slot is not specified, the API will delete the connection for the +// production slot. +func (client AppsClient) DeleteSwiftVirtualNetworkSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GenerateNewSitePublishingPasswordSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteSwiftVirtualNetworkSlot") defer func() { sc := -1 if result.Response != nil { @@ -7436,32 +7448,32 @@ func (client AppsClient) GenerateNewSitePublishingPasswordSlot(ctx context.Conte 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", "GenerateNewSitePublishingPasswordSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteSwiftVirtualNetworkSlot", err.Error()) } - req, err := client.GenerateNewSitePublishingPasswordSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.DeleteSwiftVirtualNetworkSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GenerateNewSitePublishingPasswordSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSwiftVirtualNetworkSlot", nil, "Failure preparing request") return } - resp, err := client.GenerateNewSitePublishingPasswordSlotSender(req) + resp, err := client.DeleteSwiftVirtualNetworkSlotSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "GenerateNewSitePublishingPasswordSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSwiftVirtualNetworkSlot", resp, "Failure sending request") return } - result, err = client.GenerateNewSitePublishingPasswordSlotResponder(resp) + result, err = client.DeleteSwiftVirtualNetworkSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GenerateNewSitePublishingPasswordSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSwiftVirtualNetworkSlot", resp, "Failure responding to request") } return } -// GenerateNewSitePublishingPasswordSlotPreparer prepares the GenerateNewSitePublishingPasswordSlot request. -func (client AppsClient) GenerateNewSitePublishingPasswordSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// DeleteSwiftVirtualNetworkSlotPreparer prepares the DeleteSwiftVirtualNetworkSlot request. +func (client AppsClient) DeleteSwiftVirtualNetworkSlotPreparer(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), @@ -7475,43 +7487,44 @@ func (client AppsClient) GenerateNewSitePublishingPasswordSlotPreparer(ctx conte } preparer := autorest.CreatePreparer( - autorest.AsPost(), + autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GenerateNewSitePublishingPasswordSlotSender sends the GenerateNewSitePublishingPasswordSlot request. The method will close the +// DeleteSwiftVirtualNetworkSlotSender sends the DeleteSwiftVirtualNetworkSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GenerateNewSitePublishingPasswordSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteSwiftVirtualNetworkSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GenerateNewSitePublishingPasswordSlotResponder handles the response to the GenerateNewSitePublishingPasswordSlot request. The method always +// DeleteSwiftVirtualNetworkSlotResponder handles the response to the DeleteSwiftVirtualNetworkSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GenerateNewSitePublishingPasswordSlotResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteSwiftVirtualNetworkSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), autorest.ByClosing()) result.Response = resp return } -// Get description for Gets the details of a web, mobile, or API app. +// DeleteTriggeredWebJob description for Delete a triggered web job by its ID for an app, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -func (client AppsClient) Get(ctx context.Context, resourceGroupName string, name string) (result Site, err error) { +// name - site name. +// webJobName - name of Web Job. +func (client AppsClient) DeleteTriggeredWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.Get") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteTriggeredWebJob") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.Response != nil { + sc = result.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -7521,36 +7534,37 @@ func (client AppsClient) Get(ctx context.Context, resourceGroupName string, name 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", "Get", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteTriggeredWebJob", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, name) + req, err := client.DeleteTriggeredWebJobPreparer(ctx, resourceGroupName, name, webJobName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "Get", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJob", nil, "Failure preparing request") return } - resp, err := client.GetSender(req) + resp, err := client.DeleteTriggeredWebJobSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "Get", resp, "Failure sending request") + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJob", resp, "Failure sending request") return } - result, err = client.GetResponder(resp) + result, err = client.DeleteTriggeredWebJobResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "Get", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJob", resp, "Failure responding to request") } return } -// GetPreparer prepares the Get request. -func (client AppsClient) GetPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// DeleteTriggeredWebJobPreparer prepares the DeleteTriggeredWebJob request. +func (client AppsClient) DeleteTriggeredWebJobPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "webJobName": autorest.Encode("path", webJobName), } const APIVersion = "2019-08-01" @@ -7559,45 +7573,46 @@ func (client AppsClient) GetPreparer(ctx context.Context, resourceGroupName stri } preparer := autorest.CreatePreparer( - autorest.AsGet(), + autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetSender sends the Get request. The method will close the +// DeleteTriggeredWebJobSender sends the DeleteTriggeredWebJob request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteTriggeredWebJobSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetResponder handles the response to the Get request. The method always +// DeleteTriggeredWebJobResponder handles the response to the DeleteTriggeredWebJob request. The method always // closes the http.Response Body. -func (client AppsClient) GetResponder(resp *http.Response) (result Site, err error) { +func (client AppsClient) DeleteTriggeredWebJobResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), - autorest.ByUnmarshallingJSON(&result), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} + result.Response = resp return } -// GetAppSettingKeyVaultReference description for Gets the config reference and status of an app +// DeleteTriggeredWebJobSlot description for Delete a triggered web job by its ID for an app, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// appSettingKey - app Setting key name. -func (client AppsClient) GetAppSettingKeyVaultReference(ctx context.Context, resourceGroupName string, name string, appSettingKey string) (result KeyVaultReferenceResource, err error) { +// name - site name. +// webJobName - name of Web Job. +// slot - name of the deployment slot. If a slot is not specified, the API deletes web job for the production +// slot. +func (client AppsClient) DeleteTriggeredWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetAppSettingKeyVaultReference") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteTriggeredWebJobSlot") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.Response != nil { + sc = result.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -7607,37 +7622,38 @@ func (client AppsClient) GetAppSettingKeyVaultReference(ctx context.Context, res 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", "GetAppSettingKeyVaultReference", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteTriggeredWebJobSlot", err.Error()) } - req, err := client.GetAppSettingKeyVaultReferencePreparer(ctx, resourceGroupName, name, appSettingKey) + req, err := client.DeleteTriggeredWebJobSlotPreparer(ctx, resourceGroupName, name, webJobName, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAppSettingKeyVaultReference", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJobSlot", nil, "Failure preparing request") return } - resp, err := client.GetAppSettingKeyVaultReferenceSender(req) + resp, err := client.DeleteTriggeredWebJobSlotSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAppSettingKeyVaultReference", resp, "Failure sending request") + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJobSlot", resp, "Failure sending request") return } - result, err = client.GetAppSettingKeyVaultReferenceResponder(resp) + result, err = client.DeleteTriggeredWebJobSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAppSettingKeyVaultReference", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJobSlot", resp, "Failure responding to request") } return } -// GetAppSettingKeyVaultReferencePreparer prepares the GetAppSettingKeyVaultReference request. -func (client AppsClient) GetAppSettingKeyVaultReferencePreparer(ctx context.Context, resourceGroupName string, name string, appSettingKey string) (*http.Request, error) { +// DeleteTriggeredWebJobSlotPreparer prepares the DeleteTriggeredWebJobSlot request. +func (client AppsClient) DeleteTriggeredWebJobSlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "appSettingKey": autorest.Encode("path", appSettingKey), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "webJobName": autorest.Encode("path", webJobName), } const APIVersion = "2019-08-01" @@ -7646,44 +7662,45 @@ func (client AppsClient) GetAppSettingKeyVaultReferencePreparer(ctx context.Cont } preparer := autorest.CreatePreparer( - autorest.AsGet(), + autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings/{appSettingKey}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetAppSettingKeyVaultReferenceSender sends the GetAppSettingKeyVaultReference request. The method will close the +// DeleteTriggeredWebJobSlotSender sends the DeleteTriggeredWebJobSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetAppSettingKeyVaultReferenceSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteTriggeredWebJobSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetAppSettingKeyVaultReferenceResponder handles the response to the GetAppSettingKeyVaultReference request. The method always +// DeleteTriggeredWebJobSlotResponder handles the response to the DeleteTriggeredWebJobSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetAppSettingKeyVaultReferenceResponder(resp *http.Response) (result KeyVaultReferenceResource, err error) { +func (client AppsClient) DeleteTriggeredWebJobSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} + result.Response = resp return } -// GetAppSettingsKeyVaultReferences description for Gets the config reference app settings and status of an app +// DeleteVnetConnection description for Deletes a connection from an app (or deployment slot to a named virtual +// network. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -func (client AppsClient) GetAppSettingsKeyVaultReferences(ctx context.Context, resourceGroupName string, name string) (result KeyVaultReferenceCollection, err error) { +// vnetName - name of the virtual network. +func (client AppsClient) DeleteVnetConnection(ctx context.Context, resourceGroupName string, name string, vnetName string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetAppSettingsKeyVaultReferences") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteVnetConnection") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.Response != nil { + sc = result.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -7693,36 +7710,37 @@ func (client AppsClient) GetAppSettingsKeyVaultReferences(ctx context.Context, r 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", "GetAppSettingsKeyVaultReferences", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteVnetConnection", err.Error()) } - req, err := client.GetAppSettingsKeyVaultReferencesPreparer(ctx, resourceGroupName, name) + req, err := client.DeleteVnetConnectionPreparer(ctx, resourceGroupName, name, vnetName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAppSettingsKeyVaultReferences", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteVnetConnection", nil, "Failure preparing request") return } - resp, err := client.GetAppSettingsKeyVaultReferencesSender(req) + resp, err := client.DeleteVnetConnectionSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAppSettingsKeyVaultReferences", resp, "Failure sending request") + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteVnetConnection", resp, "Failure sending request") return } - result, err = client.GetAppSettingsKeyVaultReferencesResponder(resp) + result, err = client.DeleteVnetConnectionResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAppSettingsKeyVaultReferences", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteVnetConnection", resp, "Failure responding to request") } return } -// GetAppSettingsKeyVaultReferencesPreparer prepares the GetAppSettingsKeyVaultReferences request. -func (client AppsClient) GetAppSettingsKeyVaultReferencesPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// DeleteVnetConnectionPreparer prepares the DeleteVnetConnection request. +func (client AppsClient) DeleteVnetConnectionPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vnetName": autorest.Encode("path", vnetName), } const APIVersion = "2019-08-01" @@ -7731,44 +7749,47 @@ func (client AppsClient) GetAppSettingsKeyVaultReferencesPreparer(ctx context.Co } preparer := autorest.CreatePreparer( - autorest.AsGet(), + autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetAppSettingsKeyVaultReferencesSender sends the GetAppSettingsKeyVaultReferences request. The method will close the +// DeleteVnetConnectionSender sends the DeleteVnetConnection request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetAppSettingsKeyVaultReferencesSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteVnetConnectionSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetAppSettingsKeyVaultReferencesResponder handles the response to the GetAppSettingsKeyVaultReferences request. The method always +// DeleteVnetConnectionResponder handles the response to the DeleteVnetConnection request. The method always // closes the http.Response Body. -func (client AppsClient) GetAppSettingsKeyVaultReferencesResponder(resp *http.Response) (result KeyVaultReferenceCollection, err error) { +func (client AppsClient) DeleteVnetConnectionResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} + result.Response = resp return } -// GetAuthSettings description for Gets the Authentication/Authorization settings of an app. +// DeleteVnetConnectionSlot description for Deletes a connection from an app (or deployment slot to a named virtual +// network. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -func (client AppsClient) GetAuthSettings(ctx context.Context, resourceGroupName string, name string) (result SiteAuthSettings, err error) { +// vnetName - name of the virtual network. +// slot - name of the deployment slot. If a slot is not specified, the API will delete the connection for the +// production slot. +func (client AppsClient) DeleteVnetConnectionSlot(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetAuthSettings") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteVnetConnectionSlot") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.Response != nil { + sc = result.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -7778,36 +7799,38 @@ func (client AppsClient) GetAuthSettings(ctx context.Context, 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", "GetAuthSettings", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteVnetConnectionSlot", err.Error()) } - req, err := client.GetAuthSettingsPreparer(ctx, resourceGroupName, name) + req, err := client.DeleteVnetConnectionSlotPreparer(ctx, resourceGroupName, name, vnetName, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettings", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteVnetConnectionSlot", nil, "Failure preparing request") return } - resp, err := client.GetAuthSettingsSender(req) + resp, err := client.DeleteVnetConnectionSlotSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettings", resp, "Failure sending request") + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteVnetConnectionSlot", resp, "Failure sending request") return } - result, err = client.GetAuthSettingsResponder(resp) + result, err = client.DeleteVnetConnectionSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettings", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteVnetConnectionSlot", resp, "Failure responding to request") } return } -// GetAuthSettingsPreparer prepares the GetAuthSettings request. -func (client AppsClient) GetAuthSettingsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// DeleteVnetConnectionSlotPreparer prepares the DeleteVnetConnectionSlot request. +func (client AppsClient) DeleteVnetConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, vnetName 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), + "vnetName": autorest.Encode("path", vnetName), } const APIVersion = "2019-08-01" @@ -7816,42 +7839,41 @@ func (client AppsClient) GetAuthSettingsPreparer(ctx context.Context, resourceGr } preparer := autorest.CreatePreparer( - autorest.AsPost(), + autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetAuthSettingsSender sends the GetAuthSettings request. The method will close the +// DeleteVnetConnectionSlotSender sends the DeleteVnetConnectionSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetAuthSettingsSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteVnetConnectionSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetAuthSettingsResponder handles the response to the GetAuthSettings request. The method always +// DeleteVnetConnectionSlotResponder handles the response to the DeleteVnetConnectionSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetAuthSettingsResponder(resp *http.Response) (result SiteAuthSettings, err error) { +func (client AppsClient) DeleteVnetConnectionSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} + result.Response = resp return } -// GetAuthSettingsSlot description for Gets the Authentication/Authorization settings of an app. +// DiscoverBackup description for Discovers an existing app backup that can be restored from a blob in Azure storage. +// Use this to get information about the databases stored in a backup. // 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 get the settings for the -// production slot. -func (client AppsClient) GetAuthSettingsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteAuthSettings, err error) { +// request - a RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. +func (client AppsClient) DiscoverBackup(ctx context.Context, resourceGroupName string, name string, request RestoreRequest) (result RestoreRequest, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetAuthSettingsSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DiscoverBackup") defer func() { sc := -1 if result.Response.Response != nil { @@ -7864,37 +7886,41 @@ func (client AppsClient) GetAuthSettingsSlot(ctx context.Context, resourceGroupN {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", "GetAuthSettingsSlot", err.Error()) + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}, + {TargetValue: request, + Constraints: []validation.Constraint{{Target: "request.RestoreRequestProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "request.RestoreRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "request.RestoreRequestProperties.Overwrite", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "DiscoverBackup", err.Error()) } - req, err := client.GetAuthSettingsSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.DiscoverBackupPreparer(ctx, resourceGroupName, name, request) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettingsSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DiscoverBackup", nil, "Failure preparing request") return } - resp, err := client.GetAuthSettingsSlotSender(req) + resp, err := client.DiscoverBackupSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettingsSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DiscoverBackup", resp, "Failure sending request") return } - result, err = client.GetAuthSettingsSlotResponder(resp) + result, err = client.DiscoverBackupResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettingsSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DiscoverBackup", resp, "Failure responding to request") } return } -// GetAuthSettingsSlotPreparer prepares the GetAuthSettingsSlot request. -func (client AppsClient) GetAuthSettingsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// DiscoverBackupPreparer prepares the DiscoverBackup request. +func (client AppsClient) DiscoverBackupPreparer(ctx context.Context, resourceGroupName string, name string, request RestoreRequest) (*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), } @@ -7904,23 +7930,25 @@ func (client AppsClient) GetAuthSettingsSlotPreparer(ctx context.Context, resour } preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup", pathParameters), + autorest.WithJSON(request), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetAuthSettingsSlotSender sends the GetAuthSettingsSlot request. The method will close the +// DiscoverBackupSender sends the DiscoverBackup request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetAuthSettingsSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DiscoverBackupSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetAuthSettingsSlotResponder handles the response to the GetAuthSettingsSlot request. The method always +// DiscoverBackupResponder handles the response to the DiscoverBackup request. The method always // closes the http.Response Body. -func (client AppsClient) GetAuthSettingsSlotResponder(resp *http.Response) (result SiteAuthSettings, err error) { +func (client AppsClient) DiscoverBackupResponder(resp *http.Response) (result RestoreRequest, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -7931,13 +7959,17 @@ func (client AppsClient) GetAuthSettingsSlotResponder(resp *http.Response) (resu return } -// GetBackupConfiguration description for Gets the backup configuration of an app. +// DiscoverBackupSlot description for Discovers an existing app backup that can be restored from a blob in Azure +// storage. Use this to get information about the databases stored in a backup. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -func (client AppsClient) GetBackupConfiguration(ctx context.Context, resourceGroupName string, name string) (result BackupRequest, err error) { +// request - a RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. +// slot - name of the deployment slot. If a slot is not specified, the API will perform discovery for the +// production slot. +func (client AppsClient) DiscoverBackupSlot(ctx context.Context, resourceGroupName string, name string, request RestoreRequest, slot string) (result RestoreRequest, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetBackupConfiguration") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DiscoverBackupSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -7950,36 +7982,42 @@ func (client AppsClient) GetBackupConfiguration(ctx context.Context, resourceGro {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", "GetBackupConfiguration", err.Error()) - } - - req, err := client.GetBackupConfigurationPreparer(ctx, resourceGroupName, name) + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}, + {TargetValue: request, + Constraints: []validation.Constraint{{Target: "request.RestoreRequestProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "request.RestoreRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "request.RestoreRequestProperties.Overwrite", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "DiscoverBackupSlot", err.Error()) + } + + req, err := client.DiscoverBackupSlotPreparer(ctx, resourceGroupName, name, request, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupConfiguration", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DiscoverBackupSlot", nil, "Failure preparing request") return } - resp, err := client.GetBackupConfigurationSender(req) + resp, err := client.DiscoverBackupSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupConfiguration", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DiscoverBackupSlot", resp, "Failure sending request") return } - result, err = client.GetBackupConfigurationResponder(resp) + result, err = client.DiscoverBackupSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupConfiguration", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DiscoverBackupSlot", resp, "Failure responding to request") } return } -// GetBackupConfigurationPreparer prepares the GetBackupConfiguration request. -func (client AppsClient) GetBackupConfigurationPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// DiscoverBackupSlotPreparer prepares the DiscoverBackupSlot request. +func (client AppsClient) DiscoverBackupSlotPreparer(ctx context.Context, resourceGroupName string, name string, request RestoreRequest, 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), } @@ -7989,23 +8027,25 @@ func (client AppsClient) GetBackupConfigurationPreparer(ctx context.Context, res } preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup", pathParameters), + autorest.WithJSON(request), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetBackupConfigurationSender sends the GetBackupConfiguration request. The method will close the +// DiscoverBackupSlotSender sends the DiscoverBackupSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetBackupConfigurationSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DiscoverBackupSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetBackupConfigurationResponder handles the response to the GetBackupConfiguration request. The method always +// DiscoverBackupSlotResponder handles the response to the DiscoverBackupSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetBackupConfigurationResponder(resp *http.Response) (result BackupRequest, err error) { +func (client AppsClient) DiscoverBackupSlotResponder(resp *http.Response) (result RestoreRequest, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -8016,19 +8056,18 @@ func (client AppsClient) GetBackupConfigurationResponder(resp *http.Response) (r return } -// GetBackupConfigurationSlot description for Gets the backup configuration of an app. +// GenerateNewSitePublishingPassword description for Generates a new publishing password for an app (or deployment +// slot, if specified). // 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 get the backup configuration -// for the production slot. -func (client AppsClient) GetBackupConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result BackupRequest, err error) { +func (client AppsClient) GenerateNewSitePublishingPassword(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetBackupConfigurationSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GenerateNewSitePublishingPassword") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.Response != nil { + sc = result.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -8038,36 +8077,35 @@ func (client AppsClient) GetBackupConfigurationSlot(ctx context.Context, resourc 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", "GetBackupConfigurationSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GenerateNewSitePublishingPassword", err.Error()) } - req, err := client.GetBackupConfigurationSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.GenerateNewSitePublishingPasswordPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupConfigurationSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GenerateNewSitePublishingPassword", nil, "Failure preparing request") return } - resp, err := client.GetBackupConfigurationSlotSender(req) + resp, err := client.GenerateNewSitePublishingPasswordSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupConfigurationSlot", resp, "Failure sending request") + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppsClient", "GenerateNewSitePublishingPassword", resp, "Failure sending request") return } - result, err = client.GetBackupConfigurationSlotResponder(resp) + result, err = client.GenerateNewSitePublishingPasswordResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupConfigurationSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GenerateNewSitePublishingPassword", resp, "Failure responding to request") } return } -// GetBackupConfigurationSlotPreparer prepares the GetBackupConfigurationSlot request. -func (client AppsClient) GetBackupConfigurationSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// GenerateNewSitePublishingPasswordPreparer prepares the GenerateNewSitePublishingPassword request. +func (client AppsClient) GenerateNewSitePublishingPasswordPreparer(ctx context.Context, resourceGroupName string, name 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), } @@ -8079,43 +8117,44 @@ func (client AppsClient) GetBackupConfigurationSlotPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetBackupConfigurationSlotSender sends the GetBackupConfigurationSlot request. The method will close the +// GenerateNewSitePublishingPasswordSender sends the GenerateNewSitePublishingPassword request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetBackupConfigurationSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GenerateNewSitePublishingPasswordSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetBackupConfigurationSlotResponder handles the response to the GetBackupConfigurationSlot request. The method always +// GenerateNewSitePublishingPasswordResponder handles the response to the GenerateNewSitePublishingPassword request. The method always // closes the http.Response Body. -func (client AppsClient) GetBackupConfigurationSlotResponder(resp *http.Response) (result BackupRequest, err error) { +func (client AppsClient) GenerateNewSitePublishingPasswordResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} + result.Response = resp return } -// GetBackupStatus description for Gets a backup of an app by its ID. +// GenerateNewSitePublishingPasswordSlot description for Generates a new publishing password for an app (or deployment +// slot, if specified). // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// backupID - ID of the backup. -func (client AppsClient) GetBackupStatus(ctx context.Context, resourceGroupName string, name string, backupID string) (result BackupItem, err error) { +// slot - name of the deployment slot. If a slot is not specified, the API generate a new publishing password +// for the production slot. +func (client AppsClient) GenerateNewSitePublishingPasswordSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetBackupStatus") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GenerateNewSitePublishingPasswordSlot") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.Response != nil { + sc = result.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -8125,36 +8164,36 @@ func (client AppsClient) GetBackupStatus(ctx context.Context, 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", "GetBackupStatus", err.Error()) + return result, validation.NewError("web.AppsClient", "GenerateNewSitePublishingPasswordSlot", err.Error()) } - req, err := client.GetBackupStatusPreparer(ctx, resourceGroupName, name, backupID) + req, err := client.GenerateNewSitePublishingPasswordSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupStatus", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GenerateNewSitePublishingPasswordSlot", nil, "Failure preparing request") return } - resp, err := client.GetBackupStatusSender(req) + resp, err := client.GenerateNewSitePublishingPasswordSlotSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupStatus", resp, "Failure sending request") + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppsClient", "GenerateNewSitePublishingPasswordSlot", resp, "Failure sending request") return } - result, err = client.GetBackupStatusResponder(resp) + result, err = client.GenerateNewSitePublishingPasswordSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupStatus", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GenerateNewSitePublishingPasswordSlot", resp, "Failure responding to request") } return } -// GetBackupStatusPreparer prepares the GetBackupStatus request. -func (client AppsClient) GetBackupStatusPreparer(ctx context.Context, resourceGroupName string, name string, backupID string) (*http.Request, error) { +// GenerateNewSitePublishingPasswordSlotPreparer prepares the GenerateNewSitePublishingPasswordSlot request. +func (client AppsClient) GenerateNewSitePublishingPasswordSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "backupId": autorest.Encode("path", backupID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -8164,43 +8203,39 @@ func (client AppsClient) GetBackupStatusPreparer(ctx context.Context, resourceGr } preparer := autorest.CreatePreparer( - autorest.AsGet(), + autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetBackupStatusSender sends the GetBackupStatus request. The method will close the +// GenerateNewSitePublishingPasswordSlotSender sends the GenerateNewSitePublishingPasswordSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetBackupStatusSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GenerateNewSitePublishingPasswordSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetBackupStatusResponder handles the response to the GetBackupStatus request. The method always +// GenerateNewSitePublishingPasswordSlotResponder handles the response to the GenerateNewSitePublishingPasswordSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetBackupStatusResponder(resp *http.Response) (result BackupItem, err error) { +func (client AppsClient) GenerateNewSitePublishingPasswordSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} + result.Response = resp return } -// GetBackupStatusSlot description for Gets a backup of an app by its ID. +// Get description for Gets the details of a web, mobile, or API app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// backupID - ID of the backup. -// slot - name of the deployment slot. If a slot is not specified, the API will get a backup of the production -// slot. -func (client AppsClient) GetBackupStatusSlot(ctx context.Context, resourceGroupName string, name string, backupID string, slot string) (result BackupItem, err error) { +func (client AppsClient) Get(ctx context.Context, resourceGroupName string, name string) (result Site, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetBackupStatusSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.Get") defer func() { sc := -1 if result.Response.Response != nil { @@ -8214,37 +8249,35 @@ func (client AppsClient) GetBackupStatusSlot(ctx context.Context, resourceGroupN 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", "GetBackupStatusSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "Get", err.Error()) } - req, err := client.GetBackupStatusSlotPreparer(ctx, resourceGroupName, name, backupID, slot) + req, err := client.GetPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupStatusSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "Get", nil, "Failure preparing request") return } - resp, err := client.GetBackupStatusSlotSender(req) + resp, err := client.GetSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupStatusSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "Get", resp, "Failure sending request") return } - result, err = client.GetBackupStatusSlotResponder(resp) + result, err = client.GetResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupStatusSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "Get", resp, "Failure responding to request") } return } -// GetBackupStatusSlotPreparer prepares the GetBackupStatusSlot request. -func (client AppsClient) GetBackupStatusSlotPreparer(ctx context.Context, resourceGroupName string, name string, backupID string, slot string) (*http.Request, error) { +// GetPreparer prepares the Get request. +func (client AppsClient) GetPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "backupId": autorest.Encode("path", backupID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -8256,39 +8289,39 @@ func (client AppsClient) GetBackupStatusSlotPreparer(ctx context.Context, resour preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetBackupStatusSlotSender sends the GetBackupStatusSlot request. The method will close the +// GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetBackupStatusSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetBackupStatusSlotResponder handles the response to the GetBackupStatusSlot request. The method always +// GetResponder handles the response to the Get request. The method always // closes the http.Response Body. -func (client AppsClient) GetBackupStatusSlotResponder(resp *http.Response) (result BackupItem, err error) { +func (client AppsClient) GetResponder(resp *http.Response) (result Site, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetConfiguration description for Gets the configuration of an app, such as platform version and bitness, default -// documents, virtual applications, Always On, etc. +// GetAppSettingKeyVaultReference description for Gets the config reference and status of an app // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -func (client AppsClient) GetConfiguration(ctx context.Context, resourceGroupName string, name string) (result SiteConfigResource, err error) { +// appSettingKey - app Setting key name. +func (client AppsClient) GetAppSettingKeyVaultReference(ctx context.Context, resourceGroupName string, name string, appSettingKey string) (result KeyVaultReferenceResource, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetConfiguration") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetAppSettingKeyVaultReference") defer func() { sc := -1 if result.Response.Response != nil { @@ -8302,33 +8335,34 @@ func (client AppsClient) GetConfiguration(ctx context.Context, 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", "GetConfiguration", err.Error()) + return result, validation.NewError("web.AppsClient", "GetAppSettingKeyVaultReference", err.Error()) } - req, err := client.GetConfigurationPreparer(ctx, resourceGroupName, name) + req, err := client.GetAppSettingKeyVaultReferencePreparer(ctx, resourceGroupName, name, appSettingKey) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfiguration", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAppSettingKeyVaultReference", nil, "Failure preparing request") return } - resp, err := client.GetConfigurationSender(req) + resp, err := client.GetAppSettingKeyVaultReferenceSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfiguration", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAppSettingKeyVaultReference", resp, "Failure sending request") return } - result, err = client.GetConfigurationResponder(resp) + result, err = client.GetAppSettingKeyVaultReferenceResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfiguration", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAppSettingKeyVaultReference", resp, "Failure responding to request") } return } -// GetConfigurationPreparer prepares the GetConfiguration request. -func (client AppsClient) GetConfigurationPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// GetAppSettingKeyVaultReferencePreparer prepares the GetAppSettingKeyVaultReference request. +func (client AppsClient) GetAppSettingKeyVaultReferencePreparer(ctx context.Context, resourceGroupName string, name string, appSettingKey string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "appSettingKey": autorest.Encode("path", appSettingKey), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -8342,21 +8376,21 @@ func (client AppsClient) GetConfigurationPreparer(ctx context.Context, resourceG preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings/{appSettingKey}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetConfigurationSender sends the GetConfiguration request. The method will close the +// GetAppSettingKeyVaultReferenceSender sends the GetAppSettingKeyVaultReference request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetConfigurationSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetAppSettingKeyVaultReferenceSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetConfigurationResponder handles the response to the GetConfiguration request. The method always +// GetAppSettingKeyVaultReferenceResponder handles the response to the GetAppSettingKeyVaultReference request. The method always // closes the http.Response Body. -func (client AppsClient) GetConfigurationResponder(resp *http.Response) (result SiteConfigResource, err error) { +func (client AppsClient) GetAppSettingKeyVaultReferenceResponder(resp *http.Response) (result KeyVaultReferenceResource, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -8367,16 +8401,13 @@ func (client AppsClient) GetConfigurationResponder(resp *http.Response) (result return } -// GetConfigurationSlot description for Gets the configuration of an app, such as platform version and bitness, default -// documents, virtual applications, Always On, etc. +// GetAppSettingsKeyVaultReferences description for Gets the config reference app settings and status 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 return configuration for the -// production slot. -func (client AppsClient) GetConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteConfigResource, err error) { +func (client AppsClient) GetAppSettingsKeyVaultReferences(ctx context.Context, resourceGroupName string, name string) (result KeyVaultReferenceCollection, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetConfigurationSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetAppSettingsKeyVaultReferences") defer func() { sc := -1 if result.Response.Response != nil { @@ -8390,36 +8421,35 @@ func (client AppsClient) GetConfigurationSlot(ctx context.Context, resourceGroup 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", "GetConfigurationSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetAppSettingsKeyVaultReferences", err.Error()) } - req, err := client.GetConfigurationSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.GetAppSettingsKeyVaultReferencesPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAppSettingsKeyVaultReferences", nil, "Failure preparing request") return } - resp, err := client.GetConfigurationSlotSender(req) + resp, err := client.GetAppSettingsKeyVaultReferencesSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAppSettingsKeyVaultReferences", resp, "Failure sending request") return } - result, err = client.GetConfigurationSlotResponder(resp) + result, err = client.GetAppSettingsKeyVaultReferencesResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAppSettingsKeyVaultReferences", resp, "Failure responding to request") } return } -// GetConfigurationSlotPreparer prepares the GetConfigurationSlot request. -func (client AppsClient) GetConfigurationSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// GetAppSettingsKeyVaultReferencesPreparer prepares the GetAppSettingsKeyVaultReferences request. +func (client AppsClient) GetAppSettingsKeyVaultReferencesPreparer(ctx context.Context, resourceGroupName string, name 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), } @@ -8431,21 +8461,21 @@ func (client AppsClient) GetConfigurationSlotPreparer(ctx context.Context, resou preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetConfigurationSlotSender sends the GetConfigurationSlot request. The method will close the +// GetAppSettingsKeyVaultReferencesSender sends the GetAppSettingsKeyVaultReferences request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetConfigurationSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetAppSettingsKeyVaultReferencesSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetConfigurationSlotResponder handles the response to the GetConfigurationSlot request. The method always +// GetAppSettingsKeyVaultReferencesResponder handles the response to the GetAppSettingsKeyVaultReferences request. The method always // closes the http.Response Body. -func (client AppsClient) GetConfigurationSlotResponder(resp *http.Response) (result SiteConfigResource, err error) { +func (client AppsClient) GetAppSettingsKeyVaultReferencesResponder(resp *http.Response) (result KeyVaultReferenceCollection, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -8456,14 +8486,13 @@ func (client AppsClient) GetConfigurationSlotResponder(resp *http.Response) (res return } -// GetConfigurationSnapshot description for Gets a snapshot of the configuration of an app at a previous point in time. +// GetAuthSettings description for Gets the Authentication/Authorization settings of an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// snapshotID - the ID of the snapshot to read. -func (client AppsClient) GetConfigurationSnapshot(ctx context.Context, resourceGroupName string, name string, snapshotID string) (result SiteConfigResource, err error) { +func (client AppsClient) GetAuthSettings(ctx context.Context, resourceGroupName string, name string) (result SiteAuthSettings, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetConfigurationSnapshot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetAuthSettings") defer func() { sc := -1 if result.Response.Response != nil { @@ -8477,36 +8506,35 @@ func (client AppsClient) GetConfigurationSnapshot(ctx context.Context, resourceG 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", "GetConfigurationSnapshot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetAuthSettings", err.Error()) } - req, err := client.GetConfigurationSnapshotPreparer(ctx, resourceGroupName, name, snapshotID) + req, err := client.GetAuthSettingsPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSnapshot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettings", nil, "Failure preparing request") return } - resp, err := client.GetConfigurationSnapshotSender(req) + resp, err := client.GetAuthSettingsSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSnapshot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettings", resp, "Failure sending request") return } - result, err = client.GetConfigurationSnapshotResponder(resp) + result, err = client.GetAuthSettingsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSnapshot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettings", resp, "Failure responding to request") } return } -// GetConfigurationSnapshotPreparer prepares the GetConfigurationSnapshot request. -func (client AppsClient) GetConfigurationSnapshotPreparer(ctx context.Context, resourceGroupName string, name string, snapshotID string) (*http.Request, error) { +// GetAuthSettingsPreparer prepares the GetAuthSettings request. +func (client AppsClient) GetAuthSettingsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "snapshotId": autorest.Encode("path", snapshotID), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -8516,23 +8544,23 @@ func (client AppsClient) GetConfigurationSnapshotPreparer(ctx context.Context, r } preparer := autorest.CreatePreparer( - autorest.AsGet(), + autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetConfigurationSnapshotSender sends the GetConfigurationSnapshot request. The method will close the +// GetAuthSettingsSender sends the GetAuthSettings request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetConfigurationSnapshotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetAuthSettingsSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetConfigurationSnapshotResponder handles the response to the GetConfigurationSnapshot request. The method always +// GetAuthSettingsResponder handles the response to the GetAuthSettings request. The method always // closes the http.Response Body. -func (client AppsClient) GetConfigurationSnapshotResponder(resp *http.Response) (result SiteConfigResource, err error) { +func (client AppsClient) GetAuthSettingsResponder(resp *http.Response) (result SiteAuthSettings, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -8543,17 +8571,15 @@ func (client AppsClient) GetConfigurationSnapshotResponder(resp *http.Response) return } -// GetConfigurationSnapshotSlot description for Gets a snapshot of the configuration of an app at a previous point in -// time. +// GetAuthSettingsSlot description for Gets the Authentication/Authorization settings of an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// snapshotID - the ID of the snapshot to read. -// slot - name of the deployment slot. If a slot is not specified, the API will return configuration for the +// slot - name of the deployment slot. If a slot is not specified, the API will get the settings for the // production slot. -func (client AppsClient) GetConfigurationSnapshotSlot(ctx context.Context, resourceGroupName string, name string, snapshotID string, slot string) (result SiteConfigResource, err error) { +func (client AppsClient) GetAuthSettingsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteAuthSettings, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetConfigurationSnapshotSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetAuthSettingsSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -8567,37 +8593,36 @@ func (client AppsClient) GetConfigurationSnapshotSlot(ctx context.Context, resou 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", "GetConfigurationSnapshotSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetAuthSettingsSlot", err.Error()) } - req, err := client.GetConfigurationSnapshotSlotPreparer(ctx, resourceGroupName, name, snapshotID, slot) + req, err := client.GetAuthSettingsSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSnapshotSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettingsSlot", nil, "Failure preparing request") return } - resp, err := client.GetConfigurationSnapshotSlotSender(req) + resp, err := client.GetAuthSettingsSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSnapshotSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettingsSlot", resp, "Failure sending request") return } - result, err = client.GetConfigurationSnapshotSlotResponder(resp) + result, err = client.GetAuthSettingsSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSnapshotSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettingsSlot", resp, "Failure responding to request") } return } -// GetConfigurationSnapshotSlotPreparer prepares the GetConfigurationSnapshotSlot request. -func (client AppsClient) GetConfigurationSnapshotSlotPreparer(ctx context.Context, resourceGroupName string, name string, snapshotID string, slot string) (*http.Request, error) { +// GetAuthSettingsSlotPreparer prepares the GetAuthSettingsSlot request. +func (client AppsClient) GetAuthSettingsSlotPreparer(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), - "snapshotId": autorest.Encode("path", snapshotID), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -8607,23 +8632,23 @@ func (client AppsClient) GetConfigurationSnapshotSlotPreparer(ctx context.Contex } preparer := autorest.CreatePreparer( - autorest.AsGet(), + autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetConfigurationSnapshotSlotSender sends the GetConfigurationSnapshotSlot request. The method will close the +// GetAuthSettingsSlotSender sends the GetAuthSettingsSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetConfigurationSnapshotSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetAuthSettingsSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetConfigurationSnapshotSlotResponder handles the response to the GetConfigurationSnapshotSlot request. The method always +// GetAuthSettingsSlotResponder handles the response to the GetAuthSettingsSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetConfigurationSnapshotSlotResponder(resp *http.Response) (result SiteConfigResource, err error) { +func (client AppsClient) GetAuthSettingsSlotResponder(resp *http.Response) (result SiteAuthSettings, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -8634,13 +8659,13 @@ func (client AppsClient) GetConfigurationSnapshotSlotResponder(resp *http.Respon return } -// GetContainerLogsZip description for Gets the ZIP archived docker log files for the given site +// GetBackupConfiguration description for Gets the backup configuration of an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of web app. -func (client AppsClient) GetContainerLogsZip(ctx context.Context, resourceGroupName string, name string) (result ReadCloser, err error) { +// name - name of the app. +func (client AppsClient) GetBackupConfiguration(ctx context.Context, resourceGroupName string, name string) (result BackupRequest, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetContainerLogsZip") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetBackupConfiguration") defer func() { sc := -1 if result.Response.Response != nil { @@ -8654,32 +8679,32 @@ func (client AppsClient) GetContainerLogsZip(ctx context.Context, resourceGroupN 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", "GetContainerLogsZip", err.Error()) + return result, validation.NewError("web.AppsClient", "GetBackupConfiguration", err.Error()) } - req, err := client.GetContainerLogsZipPreparer(ctx, resourceGroupName, name) + req, err := client.GetBackupConfigurationPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContainerLogsZip", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupConfiguration", nil, "Failure preparing request") return } - resp, err := client.GetContainerLogsZipSender(req) + resp, err := client.GetBackupConfigurationSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContainerLogsZip", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupConfiguration", resp, "Failure sending request") return } - result, err = client.GetContainerLogsZipResponder(resp) + result, err = client.GetBackupConfigurationResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContainerLogsZip", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupConfiguration", resp, "Failure responding to request") } return } -// GetContainerLogsZipPreparer prepares the GetContainerLogsZip request. -func (client AppsClient) GetContainerLogsZipPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// GetBackupConfigurationPreparer prepares the GetBackupConfiguration request. +func (client AppsClient) GetBackupConfigurationPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -8694,38 +8719,40 @@ func (client AppsClient) GetContainerLogsZipPreparer(ctx context.Context, resour preparer := autorest.CreatePreparer( autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetContainerLogsZipSender sends the GetContainerLogsZip request. The method will close the +// GetBackupConfigurationSender sends the GetBackupConfiguration request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetContainerLogsZipSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetBackupConfigurationSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetContainerLogsZipResponder handles the response to the GetContainerLogsZip request. The method always +// GetBackupConfigurationResponder handles the response to the GetBackupConfiguration request. The method always // closes the http.Response Body. -func (client AppsClient) GetContainerLogsZipResponder(resp *http.Response) (result ReadCloser, err error) { - result.Value = &resp.Body +func (client AppsClient) GetBackupConfigurationResponder(resp *http.Response) (result BackupRequest, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent)) + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetContainerLogsZipSlot description for Gets the ZIP archived docker log files for the given site +// GetBackupConfigurationSlot description for Gets the backup configuration of an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of web app. -// slot - name of web app slot. If not specified then will default to production slot. -func (client AppsClient) GetContainerLogsZipSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result ReadCloser, err error) { +// name - name of the app. +// slot - name of the deployment slot. If a slot is not specified, the API will get the backup configuration +// for the production slot. +func (client AppsClient) GetBackupConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result BackupRequest, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetContainerLogsZipSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetBackupConfigurationSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -8739,32 +8766,32 @@ func (client AppsClient) GetContainerLogsZipSlot(ctx context.Context, resourceGr 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", "GetContainerLogsZipSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetBackupConfigurationSlot", err.Error()) } - req, err := client.GetContainerLogsZipSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.GetBackupConfigurationSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContainerLogsZipSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupConfigurationSlot", nil, "Failure preparing request") return } - resp, err := client.GetContainerLogsZipSlotSender(req) + resp, err := client.GetBackupConfigurationSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContainerLogsZipSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupConfigurationSlot", resp, "Failure sending request") return } - result, err = client.GetContainerLogsZipSlotResponder(resp) + result, err = client.GetBackupConfigurationSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContainerLogsZipSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupConfigurationSlot", resp, "Failure responding to request") } return } -// GetContainerLogsZipSlotPreparer prepares the GetContainerLogsZipSlot request. -func (client AppsClient) GetContainerLogsZipSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// GetBackupConfigurationSlotPreparer prepares the GetBackupConfigurationSlot request. +func (client AppsClient) GetBackupConfigurationSlotPreparer(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), @@ -8780,38 +8807,39 @@ func (client AppsClient) GetContainerLogsZipSlotPreparer(ctx context.Context, re preparer := autorest.CreatePreparer( autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetContainerLogsZipSlotSender sends the GetContainerLogsZipSlot request. The method will close the +// GetBackupConfigurationSlotSender sends the GetBackupConfigurationSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetContainerLogsZipSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetBackupConfigurationSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetContainerLogsZipSlotResponder handles the response to the GetContainerLogsZipSlot request. The method always +// GetBackupConfigurationSlotResponder handles the response to the GetBackupConfigurationSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetContainerLogsZipSlotResponder(resp *http.Response) (result ReadCloser, err error) { - result.Value = &resp.Body +func (client AppsClient) GetBackupConfigurationSlotResponder(resp *http.Response) (result BackupRequest, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent)) + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetContinuousWebJob description for Gets a continuous web job by its ID for an app, or a deployment slot. +// GetBackupStatus description for Gets a backup of an app by its ID. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// webJobName - name of Web Job. -func (client AppsClient) GetContinuousWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string) (result ContinuousWebJob, err error) { +// name - name of the app. +// backupID - ID of the backup. +func (client AppsClient) GetBackupStatus(ctx context.Context, resourceGroupName string, name string, backupID string) (result BackupItem, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetContinuousWebJob") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetBackupStatus") defer func() { sc := -1 if result.Response.Response != nil { @@ -8825,37 +8853,37 @@ func (client AppsClient) GetContinuousWebJob(ctx context.Context, resourceGroupN 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", "GetContinuousWebJob", err.Error()) + return result, validation.NewError("web.AppsClient", "GetBackupStatus", err.Error()) } - req, err := client.GetContinuousWebJobPreparer(ctx, resourceGroupName, name, webJobName) + req, err := client.GetBackupStatusPreparer(ctx, resourceGroupName, name, backupID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContinuousWebJob", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupStatus", nil, "Failure preparing request") return } - resp, err := client.GetContinuousWebJobSender(req) + resp, err := client.GetBackupStatusSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContinuousWebJob", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupStatus", resp, "Failure sending request") return } - result, err = client.GetContinuousWebJobResponder(resp) + result, err = client.GetBackupStatusResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContinuousWebJob", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupStatus", resp, "Failure responding to request") } return } -// GetContinuousWebJobPreparer prepares the GetContinuousWebJob request. -func (client AppsClient) GetContinuousWebJobPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string) (*http.Request, error) { +// GetBackupStatusPreparer prepares the GetBackupStatus request. +func (client AppsClient) GetBackupStatusPreparer(ctx context.Context, resourceGroupName string, name string, backupID string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "backupId": autorest.Encode("path", backupID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "webJobName": autorest.Encode("path", webJobName), } const APIVersion = "2019-08-01" @@ -8866,41 +8894,41 @@ func (client AppsClient) GetContinuousWebJobPreparer(ctx context.Context, resour preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetContinuousWebJobSender sends the GetContinuousWebJob request. The method will close the +// GetBackupStatusSender sends the GetBackupStatus request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetContinuousWebJobSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetBackupStatusSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetContinuousWebJobResponder handles the response to the GetContinuousWebJob request. The method always +// GetBackupStatusResponder handles the response to the GetBackupStatus request. The method always // closes the http.Response Body. -func (client AppsClient) GetContinuousWebJobResponder(resp *http.Response) (result ContinuousWebJob, err error) { +func (client AppsClient) GetBackupStatusResponder(resp *http.Response) (result BackupItem, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetContinuousWebJobSlot description for Gets a continuous web job by its ID for an app, or a deployment slot. +// GetBackupStatusSlot description for Gets a backup of an app by its ID. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// webJobName - name of Web Job. -// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the -// production slot. -func (client AppsClient) GetContinuousWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result ContinuousWebJob, err error) { +// name - name of the app. +// backupID - ID of the backup. +// slot - name of the deployment slot. If a slot is not specified, the API will get a backup of the production +// slot. +func (client AppsClient) GetBackupStatusSlot(ctx context.Context, resourceGroupName string, name string, backupID string, slot string) (result BackupItem, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetContinuousWebJobSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetBackupStatusSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -8914,38 +8942,38 @@ func (client AppsClient) GetContinuousWebJobSlot(ctx context.Context, resourceGr 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", "GetContinuousWebJobSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetBackupStatusSlot", err.Error()) } - req, err := client.GetContinuousWebJobSlotPreparer(ctx, resourceGroupName, name, webJobName, slot) + req, err := client.GetBackupStatusSlotPreparer(ctx, resourceGroupName, name, backupID, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContinuousWebJobSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupStatusSlot", nil, "Failure preparing request") return } - resp, err := client.GetContinuousWebJobSlotSender(req) + resp, err := client.GetBackupStatusSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContinuousWebJobSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupStatusSlot", resp, "Failure sending request") return } - result, err = client.GetContinuousWebJobSlotResponder(resp) + result, err = client.GetBackupStatusSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContinuousWebJobSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupStatusSlot", resp, "Failure responding to request") } return } -// GetContinuousWebJobSlotPreparer prepares the GetContinuousWebJobSlot request. -func (client AppsClient) GetContinuousWebJobSlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (*http.Request, error) { +// GetBackupStatusSlotPreparer prepares the GetBackupStatusSlot request. +func (client AppsClient) GetBackupStatusSlotPreparer(ctx context.Context, resourceGroupName string, name string, backupID string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "backupId": autorest.Encode("path", backupID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "webJobName": autorest.Encode("path", webJobName), } const APIVersion = "2019-08-01" @@ -8956,39 +8984,39 @@ func (client AppsClient) GetContinuousWebJobSlotPreparer(ctx context.Context, re preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetContinuousWebJobSlotSender sends the GetContinuousWebJobSlot request. The method will close the +// GetBackupStatusSlotSender sends the GetBackupStatusSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetContinuousWebJobSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetBackupStatusSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetContinuousWebJobSlotResponder handles the response to the GetContinuousWebJobSlot request. The method always +// GetBackupStatusSlotResponder handles the response to the GetBackupStatusSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetContinuousWebJobSlotResponder(resp *http.Response) (result ContinuousWebJob, err error) { +func (client AppsClient) GetBackupStatusSlotResponder(resp *http.Response) (result BackupItem, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetDeployment description for Get a deployment by its ID for an app, or a deployment slot. +// GetConfiguration description for Gets the configuration of an app, such as platform version and bitness, default +// documents, virtual applications, Always On, etc. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// ID - deployment ID. -func (client AppsClient) GetDeployment(ctx context.Context, resourceGroupName string, name string, ID string) (result Deployment, err error) { +func (client AppsClient) GetConfiguration(ctx context.Context, resourceGroupName string, name string) (result SiteConfigResource, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetDeployment") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetConfiguration") defer func() { sc := -1 if result.Response.Response != nil { @@ -9002,34 +9030,33 @@ func (client AppsClient) GetDeployment(ctx context.Context, resourceGroupName st 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", "GetDeployment", err.Error()) + return result, validation.NewError("web.AppsClient", "GetConfiguration", err.Error()) } - req, err := client.GetDeploymentPreparer(ctx, resourceGroupName, name, ID) + req, err := client.GetConfigurationPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDeployment", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfiguration", nil, "Failure preparing request") return } - resp, err := client.GetDeploymentSender(req) + resp, err := client.GetConfigurationSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDeployment", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfiguration", resp, "Failure sending request") return } - result, err = client.GetDeploymentResponder(resp) + result, err = client.GetConfigurationResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDeployment", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfiguration", resp, "Failure responding to request") } return } -// GetDeploymentPreparer prepares the GetDeployment request. -func (client AppsClient) GetDeploymentPreparer(ctx context.Context, resourceGroupName string, name string, ID string) (*http.Request, error) { +// GetConfigurationPreparer prepares the GetConfiguration request. +func (client AppsClient) GetConfigurationPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "id": autorest.Encode("path", ID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -9043,21 +9070,21 @@ func (client AppsClient) GetDeploymentPreparer(ctx context.Context, resourceGrou preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetDeploymentSender sends the GetDeployment request. The method will close the +// GetConfigurationSender sends the GetConfiguration request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetDeploymentSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetConfigurationSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetDeploymentResponder handles the response to the GetDeployment request. The method always +// GetConfigurationResponder handles the response to the GetConfiguration request. The method always // closes the http.Response Body. -func (client AppsClient) GetDeploymentResponder(resp *http.Response) (result Deployment, err error) { +func (client AppsClient) GetConfigurationResponder(resp *http.Response) (result SiteConfigResource, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -9068,16 +9095,16 @@ func (client AppsClient) GetDeploymentResponder(resp *http.Response) (result Dep return } -// GetDeploymentSlot description for Get a deployment by its ID for an app, or a deployment slot. +// GetConfigurationSlot description for Gets the configuration of an app, such as platform version and bitness, default +// documents, virtual applications, Always On, etc. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// ID - deployment ID. -// slot - name of the deployment slot. If a slot is not specified, the API gets a deployment for the production -// slot. -func (client AppsClient) GetDeploymentSlot(ctx context.Context, resourceGroupName string, name string, ID string, slot string) (result Deployment, err error) { +// slot - name of the deployment slot. If a slot is not specified, the API will return configuration for the +// production slot. +func (client AppsClient) GetConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteConfigResource, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetDeploymentSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetConfigurationSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -9091,34 +9118,33 @@ func (client AppsClient) GetDeploymentSlot(ctx context.Context, resourceGroupNam 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", "GetDeploymentSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetConfigurationSlot", err.Error()) } - req, err := client.GetDeploymentSlotPreparer(ctx, resourceGroupName, name, ID, slot) + req, err := client.GetConfigurationSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDeploymentSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSlot", nil, "Failure preparing request") return } - resp, err := client.GetDeploymentSlotSender(req) + resp, err := client.GetConfigurationSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDeploymentSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSlot", resp, "Failure sending request") return } - result, err = client.GetDeploymentSlotResponder(resp) + result, err = client.GetConfigurationSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDeploymentSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSlot", resp, "Failure responding to request") } return } -// GetDeploymentSlotPreparer prepares the GetDeploymentSlot request. -func (client AppsClient) GetDeploymentSlotPreparer(ctx context.Context, resourceGroupName string, name string, ID string, slot string) (*http.Request, error) { +// GetConfigurationSlotPreparer prepares the GetConfigurationSlot request. +func (client AppsClient) GetConfigurationSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "id": autorest.Encode("path", ID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), @@ -9133,21 +9159,21 @@ func (client AppsClient) GetDeploymentSlotPreparer(ctx context.Context, resource preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetDeploymentSlotSender sends the GetDeploymentSlot request. The method will close the +// GetConfigurationSlotSender sends the GetConfigurationSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetDeploymentSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetConfigurationSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetDeploymentSlotResponder handles the response to the GetDeploymentSlot request. The method always +// GetConfigurationSlotResponder handles the response to the GetConfigurationSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetDeploymentSlotResponder(resp *http.Response) (result Deployment, err error) { +func (client AppsClient) GetConfigurationSlotResponder(resp *http.Response) (result SiteConfigResource, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -9158,13 +9184,14 @@ func (client AppsClient) GetDeploymentSlotResponder(resp *http.Response) (result return } -// GetDiagnosticLogsConfiguration description for Gets the logging configuration of an app. +// GetConfigurationSnapshot description for Gets a snapshot of the configuration of an app at a previous point in time. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -func (client AppsClient) GetDiagnosticLogsConfiguration(ctx context.Context, resourceGroupName string, name string) (result SiteLogsConfig, err error) { +// snapshotID - the ID of the snapshot to read. +func (client AppsClient) GetConfigurationSnapshot(ctx context.Context, resourceGroupName string, name string, snapshotID string) (result SiteConfigResource, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetDiagnosticLogsConfiguration") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetConfigurationSnapshot") defer func() { sc := -1 if result.Response.Response != nil { @@ -9178,35 +9205,36 @@ func (client AppsClient) GetDiagnosticLogsConfiguration(ctx context.Context, res 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", "GetDiagnosticLogsConfiguration", err.Error()) + return result, validation.NewError("web.AppsClient", "GetConfigurationSnapshot", err.Error()) } - req, err := client.GetDiagnosticLogsConfigurationPreparer(ctx, resourceGroupName, name) + req, err := client.GetConfigurationSnapshotPreparer(ctx, resourceGroupName, name, snapshotID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDiagnosticLogsConfiguration", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSnapshot", nil, "Failure preparing request") return } - resp, err := client.GetDiagnosticLogsConfigurationSender(req) + resp, err := client.GetConfigurationSnapshotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDiagnosticLogsConfiguration", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSnapshot", resp, "Failure sending request") return } - result, err = client.GetDiagnosticLogsConfigurationResponder(resp) + result, err = client.GetConfigurationSnapshotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDiagnosticLogsConfiguration", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSnapshot", resp, "Failure responding to request") } return } -// GetDiagnosticLogsConfigurationPreparer prepares the GetDiagnosticLogsConfiguration request. -func (client AppsClient) GetDiagnosticLogsConfigurationPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// GetConfigurationSnapshotPreparer prepares the GetConfigurationSnapshot request. +func (client AppsClient) GetConfigurationSnapshotPreparer(ctx context.Context, resourceGroupName string, name string, snapshotID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "snapshotId": autorest.Encode("path", snapshotID), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -9218,21 +9246,21 @@ func (client AppsClient) GetDiagnosticLogsConfigurationPreparer(ctx context.Cont preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetDiagnosticLogsConfigurationSender sends the GetDiagnosticLogsConfiguration request. The method will close the +// GetConfigurationSnapshotSender sends the GetConfigurationSnapshot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetDiagnosticLogsConfigurationSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetConfigurationSnapshotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetDiagnosticLogsConfigurationResponder handles the response to the GetDiagnosticLogsConfiguration request. The method always +// GetConfigurationSnapshotResponder handles the response to the GetConfigurationSnapshot request. The method always // closes the http.Response Body. -func (client AppsClient) GetDiagnosticLogsConfigurationResponder(resp *http.Response) (result SiteLogsConfig, err error) { +func (client AppsClient) GetConfigurationSnapshotResponder(resp *http.Response) (result SiteConfigResource, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -9243,15 +9271,17 @@ func (client AppsClient) GetDiagnosticLogsConfigurationResponder(resp *http.Resp return } -// GetDiagnosticLogsConfigurationSlot description for Gets the logging configuration of an app. +// GetConfigurationSnapshotSlot description for Gets a snapshot of the configuration of an app at a previous point in +// time. // 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 get the logging configuration -// for the production slot. -func (client AppsClient) GetDiagnosticLogsConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteLogsConfig, err error) { +// snapshotID - the ID of the snapshot to read. +// slot - name of the deployment slot. If a slot is not specified, the API will return configuration for the +// production slot. +func (client AppsClient) GetConfigurationSnapshotSlot(ctx context.Context, resourceGroupName string, name string, snapshotID string, slot string) (result SiteConfigResource, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetDiagnosticLogsConfigurationSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetConfigurationSnapshotSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -9265,36 +9295,37 @@ func (client AppsClient) GetDiagnosticLogsConfigurationSlot(ctx context.Context, 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", "GetDiagnosticLogsConfigurationSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetConfigurationSnapshotSlot", err.Error()) } - req, err := client.GetDiagnosticLogsConfigurationSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.GetConfigurationSnapshotSlotPreparer(ctx, resourceGroupName, name, snapshotID, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDiagnosticLogsConfigurationSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSnapshotSlot", nil, "Failure preparing request") return } - resp, err := client.GetDiagnosticLogsConfigurationSlotSender(req) + resp, err := client.GetConfigurationSnapshotSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDiagnosticLogsConfigurationSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSnapshotSlot", resp, "Failure sending request") return } - result, err = client.GetDiagnosticLogsConfigurationSlotResponder(resp) + result, err = client.GetConfigurationSnapshotSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDiagnosticLogsConfigurationSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSnapshotSlot", resp, "Failure responding to request") } return } -// GetDiagnosticLogsConfigurationSlotPreparer prepares the GetDiagnosticLogsConfigurationSlot request. -func (client AppsClient) GetDiagnosticLogsConfigurationSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// GetConfigurationSnapshotSlotPreparer prepares the GetConfigurationSnapshotSlot request. +func (client AppsClient) GetConfigurationSnapshotSlotPreparer(ctx context.Context, resourceGroupName string, name string, snapshotID 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), + "snapshotId": autorest.Encode("path", snapshotID), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -9306,21 +9337,21 @@ func (client AppsClient) GetDiagnosticLogsConfigurationSlotPreparer(ctx context. preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetDiagnosticLogsConfigurationSlotSender sends the GetDiagnosticLogsConfigurationSlot request. The method will close the +// GetConfigurationSnapshotSlotSender sends the GetConfigurationSnapshotSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetDiagnosticLogsConfigurationSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetConfigurationSnapshotSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetDiagnosticLogsConfigurationSlotResponder handles the response to the GetDiagnosticLogsConfigurationSlot request. The method always +// GetConfigurationSnapshotSlotResponder handles the response to the GetConfigurationSnapshotSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetDiagnosticLogsConfigurationSlotResponder(resp *http.Response) (result SiteLogsConfig, err error) { +func (client AppsClient) GetConfigurationSnapshotSlotResponder(resp *http.Response) (result SiteConfigResource, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -9331,14 +9362,13 @@ func (client AppsClient) GetDiagnosticLogsConfigurationSlotResponder(resp *http. return } -// GetDomainOwnershipIdentifier description for Get domain ownership identifier for web app. +// GetContainerLogsZip description for Gets the ZIP archived docker log files for the given site // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// domainOwnershipIdentifierName - name of domain ownership identifier. -func (client AppsClient) GetDomainOwnershipIdentifier(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string) (result Identifier, err error) { +// name - name of web app. +func (client AppsClient) GetContainerLogsZip(ctx context.Context, resourceGroupName string, name string) (result ReadCloser, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetDomainOwnershipIdentifier") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetContainerLogsZip") defer func() { sc := -1 if result.Response.Response != nil { @@ -9352,37 +9382,36 @@ func (client AppsClient) GetDomainOwnershipIdentifier(ctx context.Context, resou 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", "GetDomainOwnershipIdentifier", err.Error()) + return result, validation.NewError("web.AppsClient", "GetContainerLogsZip", err.Error()) } - req, err := client.GetDomainOwnershipIdentifierPreparer(ctx, resourceGroupName, name, domainOwnershipIdentifierName) + req, err := client.GetContainerLogsZipPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDomainOwnershipIdentifier", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContainerLogsZip", nil, "Failure preparing request") return } - resp, err := client.GetDomainOwnershipIdentifierSender(req) + resp, err := client.GetContainerLogsZipSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDomainOwnershipIdentifier", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContainerLogsZip", resp, "Failure sending request") return } - result, err = client.GetDomainOwnershipIdentifierResponder(resp) + result, err = client.GetContainerLogsZipResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDomainOwnershipIdentifier", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContainerLogsZip", resp, "Failure responding to request") } return } -// GetDomainOwnershipIdentifierPreparer prepares the GetDomainOwnershipIdentifier request. -func (client AppsClient) GetDomainOwnershipIdentifierPreparer(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string) (*http.Request, error) { +// GetContainerLogsZipPreparer prepares the GetContainerLogsZip request. +func (client AppsClient) GetContainerLogsZipPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "domainOwnershipIdentifierName": autorest.Encode("path", domainOwnershipIdentifierName), - "name": autorest.Encode("path", name), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2019-08-01" @@ -9391,43 +9420,40 @@ func (client AppsClient) GetDomainOwnershipIdentifierPreparer(ctx context.Contex } preparer := autorest.CreatePreparer( - autorest.AsGet(), + autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetDomainOwnershipIdentifierSender sends the GetDomainOwnershipIdentifier request. The method will close the +// GetContainerLogsZipSender sends the GetContainerLogsZip request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetDomainOwnershipIdentifierSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetContainerLogsZipSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetDomainOwnershipIdentifierResponder handles the response to the GetDomainOwnershipIdentifier request. The method always +// GetContainerLogsZipResponder handles the response to the GetContainerLogsZip request. The method always // closes the http.Response Body. -func (client AppsClient) GetDomainOwnershipIdentifierResponder(resp *http.Response) (result Identifier, err error) { +func (client AppsClient) GetContainerLogsZipResponder(resp *http.Response) (result ReadCloser, err error) { + result.Value = &resp.Body err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent)) result.Response = autorest.Response{Response: resp} return } -// GetDomainOwnershipIdentifierSlot description for Get domain ownership identifier for web app. +// GetContainerLogsZipSlot description for Gets the ZIP archived docker log files for the given site // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// domainOwnershipIdentifierName - name of domain ownership identifier. -// slot - name of the deployment slot. If a slot is not specified, the API will delete the binding for the -// production slot. -func (client AppsClient) GetDomainOwnershipIdentifierSlot(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string) (result Identifier, err error) { +// name - name of web app. +// slot - name of web app slot. If not specified then will default to production slot. +func (client AppsClient) GetContainerLogsZipSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result ReadCloser, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetDomainOwnershipIdentifierSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetContainerLogsZipSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -9441,38 +9467,37 @@ func (client AppsClient) GetDomainOwnershipIdentifierSlot(ctx context.Context, r 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", "GetDomainOwnershipIdentifierSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetContainerLogsZipSlot", err.Error()) } - req, err := client.GetDomainOwnershipIdentifierSlotPreparer(ctx, resourceGroupName, name, domainOwnershipIdentifierName, slot) + req, err := client.GetContainerLogsZipSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDomainOwnershipIdentifierSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContainerLogsZipSlot", nil, "Failure preparing request") return } - resp, err := client.GetDomainOwnershipIdentifierSlotSender(req) + resp, err := client.GetContainerLogsZipSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDomainOwnershipIdentifierSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContainerLogsZipSlot", resp, "Failure sending request") return } - result, err = client.GetDomainOwnershipIdentifierSlotResponder(resp) + result, err = client.GetContainerLogsZipSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDomainOwnershipIdentifierSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContainerLogsZipSlot", resp, "Failure responding to request") } return } -// GetDomainOwnershipIdentifierSlotPreparer prepares the GetDomainOwnershipIdentifierSlot request. -func (client AppsClient) GetDomainOwnershipIdentifierSlotPreparer(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string) (*http.Request, error) { +// GetContainerLogsZipSlotPreparer prepares the GetContainerLogsZipSlot request. +func (client AppsClient) GetContainerLogsZipSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "domainOwnershipIdentifierName": autorest.Encode("path", domainOwnershipIdentifierName), - "name": autorest.Encode("path", name), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2019-08-01" @@ -9481,41 +9506,40 @@ func (client AppsClient) GetDomainOwnershipIdentifierSlotPreparer(ctx context.Co } preparer := autorest.CreatePreparer( - autorest.AsGet(), + autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetDomainOwnershipIdentifierSlotSender sends the GetDomainOwnershipIdentifierSlot request. The method will close the +// GetContainerLogsZipSlotSender sends the GetContainerLogsZipSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetDomainOwnershipIdentifierSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetContainerLogsZipSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetDomainOwnershipIdentifierSlotResponder handles the response to the GetDomainOwnershipIdentifierSlot request. The method always +// GetContainerLogsZipSlotResponder handles the response to the GetContainerLogsZipSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetDomainOwnershipIdentifierSlotResponder(resp *http.Response) (result Identifier, err error) { +func (client AppsClient) GetContainerLogsZipSlotResponder(resp *http.Response) (result ReadCloser, err error) { + result.Value = &resp.Body err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent)) result.Response = autorest.Response{Response: resp} return } -// GetFunction description for Get function information by its ID for web site, or a deployment slot. +// GetContinuousWebJob description for Gets a continuous web job by its ID for an app, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - site name. -// functionName - function name. -func (client AppsClient) GetFunction(ctx context.Context, resourceGroupName string, name string, functionName string) (result FunctionEnvelope, err error) { +// webJobName - name of Web Job. +func (client AppsClient) GetContinuousWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string) (result ContinuousWebJob, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetFunction") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetContinuousWebJob") defer func() { sc := -1 if result.Response.Response != nil { @@ -9529,37 +9553,37 @@ func (client AppsClient) GetFunction(ctx context.Context, resourceGroupName stri 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", "GetFunction", err.Error()) + return result, validation.NewError("web.AppsClient", "GetContinuousWebJob", err.Error()) } - req, err := client.GetFunctionPreparer(ctx, resourceGroupName, name, functionName) + req, err := client.GetContinuousWebJobPreparer(ctx, resourceGroupName, name, webJobName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunction", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContinuousWebJob", nil, "Failure preparing request") return } - resp, err := client.GetFunctionSender(req) + resp, err := client.GetContinuousWebJobSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunction", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContinuousWebJob", resp, "Failure sending request") return } - result, err = client.GetFunctionResponder(resp) + result, err = client.GetContinuousWebJobResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunction", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContinuousWebJob", resp, "Failure responding to request") } return } -// GetFunctionPreparer prepares the GetFunction request. -func (client AppsClient) GetFunctionPreparer(ctx context.Context, resourceGroupName string, name string, functionName string) (*http.Request, error) { +// GetContinuousWebJobPreparer prepares the GetContinuousWebJob request. +func (client AppsClient) GetContinuousWebJobPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "functionName": autorest.Encode("path", functionName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "webJobName": autorest.Encode("path", webJobName), } const APIVersion = "2019-08-01" @@ -9570,21 +9594,21 @@ func (client AppsClient) GetFunctionPreparer(ctx context.Context, resourceGroupN preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetFunctionSender sends the GetFunction request. The method will close the +// GetContinuousWebJobSender sends the GetContinuousWebJob request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetFunctionSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetContinuousWebJobSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetFunctionResponder handles the response to the GetFunction request. The method always +// GetContinuousWebJobResponder handles the response to the GetContinuousWebJob request. The method always // closes the http.Response Body. -func (client AppsClient) GetFunctionResponder(resp *http.Response) (result FunctionEnvelope, err error) { +func (client AppsClient) GetContinuousWebJobResponder(resp *http.Response) (result ContinuousWebJob, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -9595,13 +9619,16 @@ func (client AppsClient) GetFunctionResponder(resp *http.Response) (result Funct return } -// GetFunctionsAdminToken description for Fetch a short lived token that can be exchanged for a master key. +// GetContinuousWebJobSlot description for Gets a continuous web job by its ID for an app, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of web app. -func (client AppsClient) GetFunctionsAdminToken(ctx context.Context, resourceGroupName string, name string) (result String, err error) { +// name - site name. +// webJobName - name of Web Job. +// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the +// production slot. +func (client AppsClient) GetContinuousWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result ContinuousWebJob, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetFunctionsAdminToken") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetContinuousWebJobSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -9615,36 +9642,38 @@ func (client AppsClient) GetFunctionsAdminToken(ctx context.Context, resourceGro 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", "GetFunctionsAdminToken", err.Error()) + return result, validation.NewError("web.AppsClient", "GetContinuousWebJobSlot", err.Error()) } - req, err := client.GetFunctionsAdminTokenPreparer(ctx, resourceGroupName, name) + req, err := client.GetContinuousWebJobSlotPreparer(ctx, resourceGroupName, name, webJobName, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminToken", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContinuousWebJobSlot", nil, "Failure preparing request") return } - resp, err := client.GetFunctionsAdminTokenSender(req) + resp, err := client.GetContinuousWebJobSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminToken", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContinuousWebJobSlot", resp, "Failure sending request") return } - result, err = client.GetFunctionsAdminTokenResponder(resp) + result, err = client.GetContinuousWebJobSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminToken", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContinuousWebJobSlot", resp, "Failure responding to request") } return } -// GetFunctionsAdminTokenPreparer prepares the GetFunctionsAdminToken request. -func (client AppsClient) GetFunctionsAdminTokenPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// GetContinuousWebJobSlotPreparer prepares the GetContinuousWebJobSlot request. +func (client AppsClient) GetContinuousWebJobSlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName 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), + "webJobName": autorest.Encode("path", webJobName), } const APIVersion = "2019-08-01" @@ -9655,39 +9684,39 @@ func (client AppsClient) GetFunctionsAdminTokenPreparer(ctx context.Context, res preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetFunctionsAdminTokenSender sends the GetFunctionsAdminToken request. The method will close the +// GetContinuousWebJobSlotSender sends the GetContinuousWebJobSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetFunctionsAdminTokenSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetContinuousWebJobSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetFunctionsAdminTokenResponder handles the response to the GetFunctionsAdminToken request. The method always +// GetContinuousWebJobSlotResponder handles the response to the GetContinuousWebJobSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetFunctionsAdminTokenResponder(resp *http.Response) (result String, err error) { +func (client AppsClient) GetContinuousWebJobSlotResponder(resp *http.Response) (result ContinuousWebJob, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Value), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetFunctionsAdminTokenSlot description for Fetch a short lived token that can be exchanged for a master key. +// GetDeployment description for Get a deployment by its ID for an app, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of web app. -// slot - name of web app slot. If not specified then will default to production slot. -func (client AppsClient) GetFunctionsAdminTokenSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result String, err error) { +// name - name of the app. +// ID - deployment ID. +func (client AppsClient) GetDeployment(ctx context.Context, resourceGroupName string, name string, ID string) (result Deployment, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetFunctionsAdminTokenSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetDeployment") defer func() { sc := -1 if result.Response.Response != nil { @@ -9701,36 +9730,36 @@ func (client AppsClient) GetFunctionsAdminTokenSlot(ctx context.Context, resourc 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", "GetFunctionsAdminTokenSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetDeployment", err.Error()) } - req, err := client.GetFunctionsAdminTokenSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.GetDeploymentPreparer(ctx, resourceGroupName, name, ID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminTokenSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDeployment", nil, "Failure preparing request") return } - resp, err := client.GetFunctionsAdminTokenSlotSender(req) + resp, err := client.GetDeploymentSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminTokenSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDeployment", resp, "Failure sending request") return } - result, err = client.GetFunctionsAdminTokenSlotResponder(resp) + result, err = client.GetDeploymentResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminTokenSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDeployment", resp, "Failure responding to request") } return } -// GetFunctionsAdminTokenSlotPreparer prepares the GetFunctionsAdminTokenSlot request. -func (client AppsClient) GetFunctionsAdminTokenSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// GetDeploymentPreparer prepares the GetDeployment request. +func (client AppsClient) GetDeploymentPreparer(ctx context.Context, resourceGroupName string, name string, ID string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "id": autorest.Encode("path", ID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -9742,39 +9771,41 @@ func (client AppsClient) GetFunctionsAdminTokenSlotPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetFunctionsAdminTokenSlotSender sends the GetFunctionsAdminTokenSlot request. The method will close the +// GetDeploymentSender sends the GetDeployment request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetFunctionsAdminTokenSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetDeploymentSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetFunctionsAdminTokenSlotResponder handles the response to the GetFunctionsAdminTokenSlot request. The method always +// GetDeploymentResponder handles the response to the GetDeployment request. The method always // closes the http.Response Body. -func (client AppsClient) GetFunctionsAdminTokenSlotResponder(resp *http.Response) (result String, err error) { +func (client AppsClient) GetDeploymentResponder(resp *http.Response) (result Deployment, err error) { err = autorest.Respond( resp, client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetHostNameBinding description for Get the named hostname binding for an app (or deployment slot, if specified). +// GetDeploymentSlot description for Get a deployment by its ID for an app, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// hostName - hostname in the hostname binding. -func (client AppsClient) GetHostNameBinding(ctx context.Context, resourceGroupName string, name string, hostName string) (result HostNameBinding, err error) { +// ID - deployment ID. +// slot - name of the deployment slot. If a slot is not specified, the API gets a deployment for the production +// slot. +func (client AppsClient) GetDeploymentSlot(ctx context.Context, resourceGroupName string, name string, ID string, slot string) (result Deployment, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetHostNameBinding") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetDeploymentSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -9788,36 +9819,37 @@ func (client AppsClient) GetHostNameBinding(ctx context.Context, resourceGroupNa 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", "GetHostNameBinding", err.Error()) + return result, validation.NewError("web.AppsClient", "GetDeploymentSlot", err.Error()) } - req, err := client.GetHostNameBindingPreparer(ctx, resourceGroupName, name, hostName) + req, err := client.GetDeploymentSlotPreparer(ctx, resourceGroupName, name, ID, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHostNameBinding", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDeploymentSlot", nil, "Failure preparing request") return } - resp, err := client.GetHostNameBindingSender(req) + resp, err := client.GetDeploymentSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHostNameBinding", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDeploymentSlot", resp, "Failure sending request") return } - result, err = client.GetHostNameBindingResponder(resp) + result, err = client.GetDeploymentSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHostNameBinding", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDeploymentSlot", resp, "Failure responding to request") } return } -// GetHostNameBindingPreparer prepares the GetHostNameBinding request. -func (client AppsClient) GetHostNameBindingPreparer(ctx context.Context, resourceGroupName string, name string, hostName string) (*http.Request, error) { +// GetDeploymentSlotPreparer prepares the GetDeploymentSlot request. +func (client AppsClient) GetDeploymentSlotPreparer(ctx context.Context, resourceGroupName string, name string, ID string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "hostName": autorest.Encode("path", hostName), + "id": autorest.Encode("path", ID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -9829,21 +9861,21 @@ func (client AppsClient) GetHostNameBindingPreparer(ctx context.Context, resourc preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetHostNameBindingSender sends the GetHostNameBinding request. The method will close the +// GetDeploymentSlotSender sends the GetDeploymentSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetHostNameBindingSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetDeploymentSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetHostNameBindingResponder handles the response to the GetHostNameBinding request. The method always +// GetDeploymentSlotResponder handles the response to the GetDeploymentSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetHostNameBindingResponder(resp *http.Response) (result HostNameBinding, err error) { +func (client AppsClient) GetDeploymentSlotResponder(resp *http.Response) (result Deployment, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -9854,16 +9886,13 @@ func (client AppsClient) GetHostNameBindingResponder(resp *http.Response) (resul return } -// GetHostNameBindingSlot description for Get the named hostname binding for an app (or deployment slot, if specified). +// GetDiagnosticLogsConfiguration description for Gets the logging configuration 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 the named binding for the production -// slot. -// hostName - hostname in the hostname binding. -func (client AppsClient) GetHostNameBindingSlot(ctx context.Context, resourceGroupName string, name string, slot string, hostName string) (result HostNameBinding, err error) { +func (client AppsClient) GetDiagnosticLogsConfiguration(ctx context.Context, resourceGroupName string, name string) (result SiteLogsConfig, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetHostNameBindingSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetDiagnosticLogsConfiguration") defer func() { sc := -1 if result.Response.Response != nil { @@ -9877,37 +9906,35 @@ func (client AppsClient) GetHostNameBindingSlot(ctx context.Context, resourceGro 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", "GetHostNameBindingSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetDiagnosticLogsConfiguration", err.Error()) } - req, err := client.GetHostNameBindingSlotPreparer(ctx, resourceGroupName, name, slot, hostName) + req, err := client.GetDiagnosticLogsConfigurationPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHostNameBindingSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDiagnosticLogsConfiguration", nil, "Failure preparing request") return } - resp, err := client.GetHostNameBindingSlotSender(req) + resp, err := client.GetDiagnosticLogsConfigurationSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHostNameBindingSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDiagnosticLogsConfiguration", resp, "Failure sending request") return } - result, err = client.GetHostNameBindingSlotResponder(resp) + result, err = client.GetDiagnosticLogsConfigurationResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHostNameBindingSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDiagnosticLogsConfiguration", resp, "Failure responding to request") } return } -// GetHostNameBindingSlotPreparer prepares the GetHostNameBindingSlot request. -func (client AppsClient) GetHostNameBindingSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, hostName string) (*http.Request, error) { +// GetDiagnosticLogsConfigurationPreparer prepares the GetDiagnosticLogsConfiguration request. +func (client AppsClient) GetDiagnosticLogsConfigurationPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "hostName": autorest.Encode("path", hostName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -9919,21 +9946,21 @@ func (client AppsClient) GetHostNameBindingSlotPreparer(ctx context.Context, res preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetHostNameBindingSlotSender sends the GetHostNameBindingSlot request. The method will close the +// GetDiagnosticLogsConfigurationSender sends the GetDiagnosticLogsConfiguration request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetHostNameBindingSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetDiagnosticLogsConfigurationSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetHostNameBindingSlotResponder handles the response to the GetHostNameBindingSlot request. The method always +// GetDiagnosticLogsConfigurationResponder handles the response to the GetDiagnosticLogsConfiguration request. The method always // closes the http.Response Body. -func (client AppsClient) GetHostNameBindingSlotResponder(resp *http.Response) (result HostNameBinding, err error) { +func (client AppsClient) GetDiagnosticLogsConfigurationResponder(resp *http.Response) (result SiteLogsConfig, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -9944,15 +9971,15 @@ func (client AppsClient) GetHostNameBindingSlotResponder(resp *http.Response) (r return } -// GetHybridConnection description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. +// GetDiagnosticLogsConfigurationSlot description for Gets the logging configuration of an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - the name of the web app. -// namespaceName - the namespace for this hybrid connection. -// relayName - the relay name for this hybrid connection. -func (client AppsClient) GetHybridConnection(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string) (result HybridConnection, err error) { +// name - name of the app. +// slot - name of the deployment slot. If a slot is not specified, the API will get the logging configuration +// for the production slot. +func (client AppsClient) GetDiagnosticLogsConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteLogsConfig, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetHybridConnection") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetDiagnosticLogsConfigurationSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -9966,37 +9993,36 @@ func (client AppsClient) GetHybridConnection(ctx context.Context, resourceGroupN 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", "GetHybridConnection", err.Error()) + return result, validation.NewError("web.AppsClient", "GetDiagnosticLogsConfigurationSlot", err.Error()) } - req, err := client.GetHybridConnectionPreparer(ctx, resourceGroupName, name, namespaceName, relayName) + req, err := client.GetDiagnosticLogsConfigurationSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHybridConnection", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDiagnosticLogsConfigurationSlot", nil, "Failure preparing request") return } - resp, err := client.GetHybridConnectionSender(req) + resp, err := client.GetDiagnosticLogsConfigurationSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHybridConnection", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDiagnosticLogsConfigurationSlot", resp, "Failure sending request") return } - result, err = client.GetHybridConnectionResponder(resp) + result, err = client.GetDiagnosticLogsConfigurationSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHybridConnection", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDiagnosticLogsConfigurationSlot", resp, "Failure responding to request") } return } -// GetHybridConnectionPreparer prepares the GetHybridConnection request. -func (client AppsClient) GetHybridConnectionPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string) (*http.Request, error) { +// GetDiagnosticLogsConfigurationSlotPreparer prepares the GetDiagnosticLogsConfigurationSlot request. +func (client AppsClient) GetDiagnosticLogsConfigurationSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), - "namespaceName": autorest.Encode("path", namespaceName), - "relayName": autorest.Encode("path", relayName), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -10008,21 +10034,21 @@ func (client AppsClient) GetHybridConnectionPreparer(ctx context.Context, resour preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetHybridConnectionSender sends the GetHybridConnection request. The method will close the +// GetDiagnosticLogsConfigurationSlotSender sends the GetDiagnosticLogsConfigurationSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetHybridConnectionSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetDiagnosticLogsConfigurationSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetHybridConnectionResponder handles the response to the GetHybridConnection request. The method always +// GetDiagnosticLogsConfigurationSlotResponder handles the response to the GetDiagnosticLogsConfigurationSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetHybridConnectionResponder(resp *http.Response) (result HybridConnection, err error) { +func (client AppsClient) GetDiagnosticLogsConfigurationSlotResponder(resp *http.Response) (result SiteLogsConfig, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -10033,16 +10059,14 @@ func (client AppsClient) GetHybridConnectionResponder(resp *http.Response) (resu return } -// GetHybridConnectionSlot description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. +// GetDomainOwnershipIdentifier description for Get domain ownership identifier for web app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - the name of the web app. -// namespaceName - the namespace for this hybrid connection. -// relayName - the relay name for this hybrid connection. -// slot - the name of the slot for the web app. -func (client AppsClient) GetHybridConnectionSlot(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string) (result HybridConnection, err error) { +// name - name of the app. +// domainOwnershipIdentifierName - name of domain ownership identifier. +func (client AppsClient) GetDomainOwnershipIdentifier(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string) (result Identifier, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetHybridConnectionSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetDomainOwnershipIdentifier") defer func() { sc := -1 if result.Response.Response != nil { @@ -10056,39 +10080,37 @@ func (client AppsClient) GetHybridConnectionSlot(ctx context.Context, resourceGr 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", "GetHybridConnectionSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetDomainOwnershipIdentifier", err.Error()) } - req, err := client.GetHybridConnectionSlotPreparer(ctx, resourceGroupName, name, namespaceName, relayName, slot) + req, err := client.GetDomainOwnershipIdentifierPreparer(ctx, resourceGroupName, name, domainOwnershipIdentifierName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHybridConnectionSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDomainOwnershipIdentifier", nil, "Failure preparing request") return } - resp, err := client.GetHybridConnectionSlotSender(req) + resp, err := client.GetDomainOwnershipIdentifierSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHybridConnectionSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDomainOwnershipIdentifier", resp, "Failure sending request") return } - result, err = client.GetHybridConnectionSlotResponder(resp) + result, err = client.GetDomainOwnershipIdentifierResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHybridConnectionSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDomainOwnershipIdentifier", resp, "Failure responding to request") } return } -// GetHybridConnectionSlotPreparer prepares the GetHybridConnectionSlot request. -func (client AppsClient) GetHybridConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string) (*http.Request, error) { +// GetDomainOwnershipIdentifierPreparer prepares the GetDomainOwnershipIdentifier request. +func (client AppsClient) GetDomainOwnershipIdentifierPreparer(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "name": autorest.Encode("path", name), - "namespaceName": autorest.Encode("path", namespaceName), - "relayName": autorest.Encode("path", relayName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "domainOwnershipIdentifierName": autorest.Encode("path", domainOwnershipIdentifierName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2019-08-01" @@ -10099,21 +10121,21 @@ func (client AppsClient) GetHybridConnectionSlotPreparer(ctx context.Context, re preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetHybridConnectionSlotSender sends the GetHybridConnectionSlot request. The method will close the +// GetDomainOwnershipIdentifierSender sends the GetDomainOwnershipIdentifier request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetHybridConnectionSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetDomainOwnershipIdentifierSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetHybridConnectionSlotResponder handles the response to the GetHybridConnectionSlot request. The method always +// GetDomainOwnershipIdentifierResponder handles the response to the GetDomainOwnershipIdentifier request. The method always // closes the http.Response Body. -func (client AppsClient) GetHybridConnectionSlotResponder(resp *http.Response) (result HybridConnection, err error) { +func (client AppsClient) GetDomainOwnershipIdentifierResponder(resp *http.Response) (result Identifier, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -10124,15 +10146,16 @@ func (client AppsClient) GetHybridConnectionSlotResponder(resp *http.Response) ( return } -// GetInstanceFunctionSlot description for Get function information by its ID for web site, or a deployment slot. +// GetDomainOwnershipIdentifierSlot description for Get domain ownership identifier for web app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// functionName - function name. -// slot - name of the deployment slot. -func (client AppsClient) GetInstanceFunctionSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (result FunctionEnvelope, err error) { +// name - name of the app. +// domainOwnershipIdentifierName - name of domain ownership identifier. +// slot - name of the deployment slot. If a slot is not specified, the API will delete the binding for the +// production slot. +func (client AppsClient) GetDomainOwnershipIdentifierSlot(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string) (result Identifier, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceFunctionSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetDomainOwnershipIdentifierSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -10146,38 +10169,38 @@ func (client AppsClient) GetInstanceFunctionSlot(ctx context.Context, resourceGr 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", "GetInstanceFunctionSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetDomainOwnershipIdentifierSlot", err.Error()) } - req, err := client.GetInstanceFunctionSlotPreparer(ctx, resourceGroupName, name, functionName, slot) + req, err := client.GetDomainOwnershipIdentifierSlotPreparer(ctx, resourceGroupName, name, domainOwnershipIdentifierName, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceFunctionSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDomainOwnershipIdentifierSlot", nil, "Failure preparing request") return } - resp, err := client.GetInstanceFunctionSlotSender(req) + resp, err := client.GetDomainOwnershipIdentifierSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceFunctionSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDomainOwnershipIdentifierSlot", resp, "Failure sending request") return } - result, err = client.GetInstanceFunctionSlotResponder(resp) + result, err = client.GetDomainOwnershipIdentifierSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceFunctionSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDomainOwnershipIdentifierSlot", resp, "Failure responding to request") } return } -// GetInstanceFunctionSlotPreparer prepares the GetInstanceFunctionSlot request. -func (client AppsClient) GetInstanceFunctionSlotPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (*http.Request, error) { +// GetDomainOwnershipIdentifierSlotPreparer prepares the GetDomainOwnershipIdentifierSlot request. +func (client AppsClient) GetDomainOwnershipIdentifierSlotPreparer(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "functionName": autorest.Encode("path", functionName), - "name": autorest.Encode("path", name), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "domainOwnershipIdentifierName": autorest.Encode("path", domainOwnershipIdentifierName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2019-08-01" @@ -10188,38 +10211,39 @@ func (client AppsClient) GetInstanceFunctionSlotPreparer(ctx context.Context, re preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetInstanceFunctionSlotSender sends the GetInstanceFunctionSlot request. The method will close the +// GetDomainOwnershipIdentifierSlotSender sends the GetDomainOwnershipIdentifierSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetInstanceFunctionSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetDomainOwnershipIdentifierSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetInstanceFunctionSlotResponder handles the response to the GetInstanceFunctionSlot request. The method always +// GetDomainOwnershipIdentifierSlotResponder handles the response to the GetDomainOwnershipIdentifierSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetInstanceFunctionSlotResponder(resp *http.Response) (result FunctionEnvelope, err error) { +func (client AppsClient) GetDomainOwnershipIdentifierSlotResponder(resp *http.Response) (result Identifier, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetInstanceInfo description for Gets all scale-out instances of an app. +// GetFunction description for Get function information by its ID for web site, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -func (client AppsClient) GetInstanceInfo(ctx context.Context, resourceGroupName string, name string, instanceID string) (result SiteInstanceStatus, err error) { +// name - site name. +// functionName - function name. +func (client AppsClient) GetFunction(ctx context.Context, resourceGroupName string, name string, functionName string) (result FunctionEnvelope, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceInfo") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetFunction") defer func() { sc := -1 if result.Response.Response != nil { @@ -10233,34 +10257,34 @@ func (client AppsClient) GetInstanceInfo(ctx context.Context, 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", "GetInstanceInfo", err.Error()) + return result, validation.NewError("web.AppsClient", "GetFunction", err.Error()) } - req, err := client.GetInstanceInfoPreparer(ctx, resourceGroupName, name, instanceID) + req, err := client.GetFunctionPreparer(ctx, resourceGroupName, name, functionName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceInfo", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunction", nil, "Failure preparing request") return } - resp, err := client.GetInstanceInfoSender(req) + resp, err := client.GetFunctionSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceInfo", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunction", resp, "Failure sending request") return } - result, err = client.GetInstanceInfoResponder(resp) + result, err = client.GetFunctionResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceInfo", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunction", resp, "Failure responding to request") } return } -// GetInstanceInfoPreparer prepares the GetInstanceInfo request. -func (client AppsClient) GetInstanceInfoPreparer(ctx context.Context, resourceGroupName string, name string, instanceID string) (*http.Request, error) { +// GetFunctionPreparer prepares the GetFunction request. +func (client AppsClient) GetFunctionPreparer(ctx context.Context, resourceGroupName string, name string, functionName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "instanceId": autorest.Encode("path", instanceID), + "functionName": autorest.Encode("path", functionName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -10274,39 +10298,38 @@ func (client AppsClient) GetInstanceInfoPreparer(ctx context.Context, resourceGr preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetInstanceInfoSender sends the GetInstanceInfo request. The method will close the +// GetFunctionSender sends the GetFunction request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetInstanceInfoSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetFunctionSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetInstanceInfoResponder handles the response to the GetInstanceInfo request. The method always +// GetFunctionResponder handles the response to the GetFunction request. The method always // closes the http.Response Body. -func (client AppsClient) GetInstanceInfoResponder(resp *http.Response) (result SiteInstanceStatus, err error) { +func (client AppsClient) GetFunctionResponder(resp *http.Response) (result FunctionEnvelope, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetInstanceInfoSlot description for Gets all scale-out instances of an app. +// GetFunctionsAdminToken description for Fetch a short lived token that can be exchanged for a master key. // 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 gets the production slot instances. -func (client AppsClient) GetInstanceInfoSlot(ctx context.Context, resourceGroupName string, name string, instanceID string, slot string) (result SiteInstanceStatus, err error) { +// name - name of web app. +func (client AppsClient) GetFunctionsAdminToken(ctx context.Context, resourceGroupName string, name string) (result String, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceInfoSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetFunctionsAdminToken") defer func() { sc := -1 if result.Response.Response != nil { @@ -10320,37 +10343,35 @@ func (client AppsClient) GetInstanceInfoSlot(ctx context.Context, resourceGroupN 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", "GetInstanceInfoSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetFunctionsAdminToken", err.Error()) } - req, err := client.GetInstanceInfoSlotPreparer(ctx, resourceGroupName, name, instanceID, slot) + req, err := client.GetFunctionsAdminTokenPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceInfoSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminToken", nil, "Failure preparing request") return } - resp, err := client.GetInstanceInfoSlotSender(req) + resp, err := client.GetFunctionsAdminTokenSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceInfoSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminToken", resp, "Failure sending request") return } - result, err = client.GetInstanceInfoSlotResponder(resp) + result, err = client.GetFunctionsAdminTokenResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceInfoSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminToken", resp, "Failure responding to request") } return } -// GetInstanceInfoSlotPreparer prepares the GetInstanceInfoSlot request. -func (client AppsClient) GetInstanceInfoSlotPreparer(ctx context.Context, resourceGroupName string, name string, instanceID string, slot string) (*http.Request, error) { +// GetFunctionsAdminTokenPreparer prepares the GetFunctionsAdminToken request. +func (client AppsClient) GetFunctionsAdminTokenPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "instanceId": autorest.Encode("path", instanceID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -10362,39 +10383,39 @@ func (client AppsClient) GetInstanceInfoSlotPreparer(ctx context.Context, resour preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetInstanceInfoSlotSender sends the GetInstanceInfoSlot request. The method will close the +// GetFunctionsAdminTokenSender sends the GetFunctionsAdminToken request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetInstanceInfoSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetFunctionsAdminTokenSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetInstanceInfoSlotResponder handles the response to the GetInstanceInfoSlot request. The method always +// GetFunctionsAdminTokenResponder handles the response to the GetFunctionsAdminToken request. The method always // closes the http.Response Body. -func (client AppsClient) GetInstanceInfoSlotResponder(resp *http.Response) (result SiteInstanceStatus, err error) { +func (client AppsClient) GetFunctionsAdminTokenResponder(resp *http.Response) (result String, err error) { err = autorest.Respond( resp, client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), + autorest.ByUnmarshallingJSON(&result.Value), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetInstanceMSDeployLog description for Get the MSDeploy Log for the last MSDeploy operation. +// GetFunctionsAdminTokenSlot description for Fetch a short lived token that can be exchanged for a master key. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of web app. -// instanceID - ID of web app instance. -func (client AppsClient) GetInstanceMSDeployLog(ctx context.Context, resourceGroupName string, name string, instanceID string) (result MSDeployLog, err error) { +// slot - name of web app slot. If not specified then will default to production slot. +func (client AppsClient) GetFunctionsAdminTokenSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result String, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceMSDeployLog") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetFunctionsAdminTokenSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -10408,36 +10429,36 @@ func (client AppsClient) GetInstanceMSDeployLog(ctx context.Context, resourceGro 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", "GetInstanceMSDeployLog", err.Error()) + return result, validation.NewError("web.AppsClient", "GetFunctionsAdminTokenSlot", err.Error()) } - req, err := client.GetInstanceMSDeployLogPreparer(ctx, resourceGroupName, name, instanceID) + req, err := client.GetFunctionsAdminTokenSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLog", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminTokenSlot", nil, "Failure preparing request") return } - resp, err := client.GetInstanceMSDeployLogSender(req) + resp, err := client.GetFunctionsAdminTokenSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLog", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminTokenSlot", resp, "Failure sending request") return } - result, err = client.GetInstanceMSDeployLogResponder(resp) + result, err = client.GetFunctionsAdminTokenSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLog", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminTokenSlot", resp, "Failure responding to request") } return } -// GetInstanceMSDeployLogPreparer prepares the GetInstanceMSDeployLog request. -func (client AppsClient) GetInstanceMSDeployLogPreparer(ctx context.Context, resourceGroupName string, name string, instanceID string) (*http.Request, error) { +// GetFunctionsAdminTokenSlotPreparer prepares the GetFunctionsAdminTokenSlot request. +func (client AppsClient) GetFunctionsAdminTokenSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "instanceId": autorest.Encode("path", instanceID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -10449,40 +10470,39 @@ func (client AppsClient) GetInstanceMSDeployLogPreparer(ctx context.Context, res preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetInstanceMSDeployLogSender sends the GetInstanceMSDeployLog request. The method will close the +// GetFunctionsAdminTokenSlotSender sends the GetFunctionsAdminTokenSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetInstanceMSDeployLogSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetFunctionsAdminTokenSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetInstanceMSDeployLogResponder handles the response to the GetInstanceMSDeployLog request. The method always +// GetFunctionsAdminTokenSlotResponder handles the response to the GetFunctionsAdminTokenSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetInstanceMSDeployLogResponder(resp *http.Response) (result MSDeployLog, err error) { +func (client AppsClient) GetFunctionsAdminTokenSlotResponder(resp *http.Response) (result String, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), - autorest.ByUnmarshallingJSON(&result), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetInstanceMSDeployLogSlot description for Get the MSDeploy Log for the last MSDeploy operation. +// GetHostNameBinding description for Get the named hostname binding for an app (or deployment slot, if specified). // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of web app. -// slot - name of web app slot. If not specified then will default to production slot. -// instanceID - ID of web app instance. -func (client AppsClient) GetInstanceMSDeployLogSlot(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (result MSDeployLog, err error) { +// name - name of the app. +// hostName - hostname in the hostname binding. +func (client AppsClient) GetHostNameBinding(ctx context.Context, resourceGroupName string, name string, hostName string) (result HostNameBinding, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceMSDeployLogSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetHostNameBinding") defer func() { sc := -1 if result.Response.Response != nil { @@ -10496,37 +10516,36 @@ func (client AppsClient) GetInstanceMSDeployLogSlot(ctx context.Context, resourc 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", "GetInstanceMSDeployLogSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetHostNameBinding", err.Error()) } - req, err := client.GetInstanceMSDeployLogSlotPreparer(ctx, resourceGroupName, name, slot, instanceID) + req, err := client.GetHostNameBindingPreparer(ctx, resourceGroupName, name, hostName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLogSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHostNameBinding", nil, "Failure preparing request") return } - resp, err := client.GetInstanceMSDeployLogSlotSender(req) + resp, err := client.GetHostNameBindingSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLogSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHostNameBinding", resp, "Failure sending request") return } - result, err = client.GetInstanceMSDeployLogSlotResponder(resp) + result, err = client.GetHostNameBindingResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLogSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHostNameBinding", resp, "Failure responding to request") } return } -// GetInstanceMSDeployLogSlotPreparer prepares the GetInstanceMSDeployLogSlot request. -func (client AppsClient) GetInstanceMSDeployLogSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (*http.Request, error) { +// GetHostNameBindingPreparer prepares the GetHostNameBinding request. +func (client AppsClient) GetHostNameBindingPreparer(ctx context.Context, resourceGroupName string, name string, hostName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "instanceId": autorest.Encode("path", instanceID), + "hostName": autorest.Encode("path", hostName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -10538,39 +10557,41 @@ func (client AppsClient) GetInstanceMSDeployLogSlotPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetInstanceMSDeployLogSlotSender sends the GetInstanceMSDeployLogSlot request. The method will close the +// GetHostNameBindingSender sends the GetHostNameBinding request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetInstanceMSDeployLogSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetHostNameBindingSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetInstanceMSDeployLogSlotResponder handles the response to the GetInstanceMSDeployLogSlot request. The method always +// GetHostNameBindingResponder handles the response to the GetHostNameBinding request. The method always // closes the http.Response Body. -func (client AppsClient) GetInstanceMSDeployLogSlotResponder(resp *http.Response) (result MSDeployLog, err error) { +func (client AppsClient) GetHostNameBindingResponder(resp *http.Response) (result HostNameBinding, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetInstanceMsDeployStatus description for Get the status of the last MSDeploy operation. +// GetHostNameBindingSlot description for Get the named hostname binding for an app (or deployment slot, if specified). // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of web app. -// instanceID - ID of web app instance. -func (client AppsClient) GetInstanceMsDeployStatus(ctx context.Context, resourceGroupName string, name string, instanceID string) (result MSDeployStatus, err error) { +// name - name of the app. +// slot - name of the deployment slot. If a slot is not specified, the API the named binding for the production +// slot. +// hostName - hostname in the hostname binding. +func (client AppsClient) GetHostNameBindingSlot(ctx context.Context, resourceGroupName string, name string, slot string, hostName string) (result HostNameBinding, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceMsDeployStatus") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetHostNameBindingSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -10584,36 +10605,37 @@ func (client AppsClient) GetInstanceMsDeployStatus(ctx context.Context, resource 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", "GetInstanceMsDeployStatus", err.Error()) + return result, validation.NewError("web.AppsClient", "GetHostNameBindingSlot", err.Error()) } - req, err := client.GetInstanceMsDeployStatusPreparer(ctx, resourceGroupName, name, instanceID) + req, err := client.GetHostNameBindingSlotPreparer(ctx, resourceGroupName, name, slot, hostName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatus", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHostNameBindingSlot", nil, "Failure preparing request") return } - resp, err := client.GetInstanceMsDeployStatusSender(req) + resp, err := client.GetHostNameBindingSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatus", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHostNameBindingSlot", resp, "Failure sending request") return } - result, err = client.GetInstanceMsDeployStatusResponder(resp) + result, err = client.GetHostNameBindingSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatus", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHostNameBindingSlot", resp, "Failure responding to request") } return } -// GetInstanceMsDeployStatusPreparer prepares the GetInstanceMsDeployStatus request. -func (client AppsClient) GetInstanceMsDeployStatusPreparer(ctx context.Context, resourceGroupName string, name string, instanceID string) (*http.Request, error) { +// GetHostNameBindingSlotPreparer prepares the GetHostNameBindingSlot request. +func (client AppsClient) GetHostNameBindingSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, hostName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "instanceId": autorest.Encode("path", instanceID), + "hostName": autorest.Encode("path", hostName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -10625,21 +10647,21 @@ func (client AppsClient) GetInstanceMsDeployStatusPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetInstanceMsDeployStatusSender sends the GetInstanceMsDeployStatus request. The method will close the +// GetHostNameBindingSlotSender sends the GetHostNameBindingSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetInstanceMsDeployStatusSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetHostNameBindingSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetInstanceMsDeployStatusResponder handles the response to the GetInstanceMsDeployStatus request. The method always +// GetHostNameBindingSlotResponder handles the response to the GetHostNameBindingSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetInstanceMsDeployStatusResponder(resp *http.Response) (result MSDeployStatus, err error) { +func (client AppsClient) GetHostNameBindingSlotResponder(resp *http.Response) (result HostNameBinding, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -10650,15 +10672,15 @@ func (client AppsClient) GetInstanceMsDeployStatusResponder(resp *http.Response) return } -// GetInstanceMsDeployStatusSlot description for Get the status of the last MSDeploy operation. +// GetHybridConnection description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of web app. -// slot - name of web app slot. If not specified then will default to production slot. -// instanceID - ID of web app instance. -func (client AppsClient) GetInstanceMsDeployStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (result MSDeployStatus, err error) { +// name - the name of the web app. +// namespaceName - the namespace for this hybrid connection. +// relayName - the relay name for this hybrid connection. +func (client AppsClient) GetHybridConnection(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string) (result HybridConnection, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceMsDeployStatusSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetHybridConnection") defer func() { sc := -1 if result.Response.Response != nil { @@ -10672,37 +10694,37 @@ func (client AppsClient) GetInstanceMsDeployStatusSlot(ctx context.Context, reso 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", "GetInstanceMsDeployStatusSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetHybridConnection", err.Error()) } - req, err := client.GetInstanceMsDeployStatusSlotPreparer(ctx, resourceGroupName, name, slot, instanceID) + req, err := client.GetHybridConnectionPreparer(ctx, resourceGroupName, name, namespaceName, relayName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatusSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHybridConnection", nil, "Failure preparing request") return } - resp, err := client.GetInstanceMsDeployStatusSlotSender(req) + resp, err := client.GetHybridConnectionSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatusSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHybridConnection", resp, "Failure sending request") return } - result, err = client.GetInstanceMsDeployStatusSlotResponder(resp) + result, err = client.GetHybridConnectionResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatusSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHybridConnection", resp, "Failure responding to request") } return } -// GetInstanceMsDeployStatusSlotPreparer prepares the GetInstanceMsDeployStatusSlot request. -func (client AppsClient) GetInstanceMsDeployStatusSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (*http.Request, error) { +// GetHybridConnectionPreparer prepares the GetHybridConnection request. +func (client AppsClient) GetHybridConnectionPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "instanceId": autorest.Encode("path", instanceID), "name": autorest.Encode("path", name), + "namespaceName": autorest.Encode("path", namespaceName), + "relayName": autorest.Encode("path", relayName), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -10714,21 +10736,21 @@ func (client AppsClient) GetInstanceMsDeployStatusSlotPreparer(ctx context.Conte preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetInstanceMsDeployStatusSlotSender sends the GetInstanceMsDeployStatusSlot request. The method will close the +// GetHybridConnectionSender sends the GetHybridConnection request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetInstanceMsDeployStatusSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetHybridConnectionSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetInstanceMsDeployStatusSlotResponder handles the response to the GetInstanceMsDeployStatusSlot request. The method always +// GetHybridConnectionResponder handles the response to the GetHybridConnection request. The method always // closes the http.Response Body. -func (client AppsClient) GetInstanceMsDeployStatusSlotResponder(resp *http.Response) (result MSDeployStatus, err error) { +func (client AppsClient) GetHybridConnectionResponder(resp *http.Response) (result HybridConnection, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -10739,17 +10761,16 @@ func (client AppsClient) GetInstanceMsDeployStatusSlotResponder(resp *http.Respo return } -// GetInstanceProcess description for Get process information by its ID for a specific scaled-out instance in a web -// site. +// GetHybridConnectionSlot description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// processID - pID. -// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON -// response from "GET api/sites/{siteName}/instances". -func (client AppsClient) GetInstanceProcess(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (result ProcessInfo, err error) { +// name - the name of the web app. +// namespaceName - the namespace for this hybrid connection. +// relayName - the relay name for this hybrid connection. +// slot - the name of the slot for the web app. +func (client AppsClient) GetHybridConnectionSlot(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string) (result HybridConnection, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcess") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetHybridConnectionSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -10763,37 +10784,38 @@ func (client AppsClient) GetInstanceProcess(ctx context.Context, resourceGroupNa 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", "GetInstanceProcess", err.Error()) + return result, validation.NewError("web.AppsClient", "GetHybridConnectionSlot", err.Error()) } - req, err := client.GetInstanceProcessPreparer(ctx, resourceGroupName, name, processID, instanceID) + req, err := client.GetHybridConnectionSlotPreparer(ctx, resourceGroupName, name, namespaceName, relayName, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcess", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHybridConnectionSlot", nil, "Failure preparing request") return } - resp, err := client.GetInstanceProcessSender(req) + resp, err := client.GetHybridConnectionSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcess", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHybridConnectionSlot", resp, "Failure sending request") return } - result, err = client.GetInstanceProcessResponder(resp) + result, err = client.GetHybridConnectionSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcess", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHybridConnectionSlot", resp, "Failure responding to request") } return } -// GetInstanceProcessPreparer prepares the GetInstanceProcess request. -func (client AppsClient) GetInstanceProcessPreparer(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (*http.Request, error) { +// GetHybridConnectionSlotPreparer prepares the GetHybridConnectionSlot request. +func (client AppsClient) GetHybridConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "instanceId": autorest.Encode("path", instanceID), "name": autorest.Encode("path", name), - "processId": autorest.Encode("path", processID), + "namespaceName": autorest.Encode("path", namespaceName), + "relayName": autorest.Encode("path", relayName), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -10805,42 +10827,40 @@ func (client AppsClient) GetInstanceProcessPreparer(ctx context.Context, resourc preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetInstanceProcessSender sends the GetInstanceProcess request. The method will close the +// GetHybridConnectionSlotSender sends the GetHybridConnectionSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetInstanceProcessSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetHybridConnectionSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetInstanceProcessResponder handles the response to the GetInstanceProcess request. The method always +// GetHybridConnectionSlotResponder handles the response to the GetHybridConnectionSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetInstanceProcessResponder(resp *http.Response) (result ProcessInfo, err error) { +func (client AppsClient) GetHybridConnectionSlotResponder(resp *http.Response) (result HybridConnection, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetInstanceProcessDump description for Get a memory dump of a process by its ID for a specific scaled-out instance -// in a web site. +// GetInstanceFunctionSlot description for Get function information by its ID for web site, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - site name. -// processID - pID. -// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON -// response from "GET api/sites/{siteName}/instances". -func (client AppsClient) GetInstanceProcessDump(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (result ReadCloser, err error) { +// functionName - function name. +// slot - name of the deployment slot. +func (client AppsClient) GetInstanceFunctionSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (result FunctionEnvelope, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcessDump") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceFunctionSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -10854,37 +10874,37 @@ func (client AppsClient) GetInstanceProcessDump(ctx context.Context, resourceGro 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", "GetInstanceProcessDump", err.Error()) + return result, validation.NewError("web.AppsClient", "GetInstanceFunctionSlot", err.Error()) } - req, err := client.GetInstanceProcessDumpPreparer(ctx, resourceGroupName, name, processID, instanceID) + req, err := client.GetInstanceFunctionSlotPreparer(ctx, resourceGroupName, name, functionName, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDump", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceFunctionSlot", nil, "Failure preparing request") return } - resp, err := client.GetInstanceProcessDumpSender(req) + resp, err := client.GetInstanceFunctionSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDump", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceFunctionSlot", resp, "Failure sending request") return } - result, err = client.GetInstanceProcessDumpResponder(resp) + result, err = client.GetInstanceFunctionSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDump", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceFunctionSlot", resp, "Failure responding to request") } return } -// GetInstanceProcessDumpPreparer prepares the GetInstanceProcessDump request. -func (client AppsClient) GetInstanceProcessDumpPreparer(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (*http.Request, error) { +// GetInstanceFunctionSlotPreparer prepares the GetInstanceFunctionSlot request. +func (client AppsClient) GetInstanceFunctionSlotPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "instanceId": autorest.Encode("path", instanceID), + "functionName": autorest.Encode("path", functionName), "name": autorest.Encode("path", name), - "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -10896,43 +10916,38 @@ func (client AppsClient) GetInstanceProcessDumpPreparer(ctx context.Context, res preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetInstanceProcessDumpSender sends the GetInstanceProcessDump request. The method will close the +// GetInstanceFunctionSlotSender sends the GetInstanceFunctionSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetInstanceProcessDumpSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetInstanceFunctionSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetInstanceProcessDumpResponder handles the response to the GetInstanceProcessDump request. The method always +// GetInstanceFunctionSlotResponder handles the response to the GetInstanceFunctionSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetInstanceProcessDumpResponder(resp *http.Response) (result ReadCloser, err error) { - result.Value = &resp.Body +func (client AppsClient) GetInstanceFunctionSlotResponder(resp *http.Response) (result FunctionEnvelope, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound)) + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetInstanceProcessDumpSlot description for Get a memory dump of a process by its ID for a specific scaled-out -// instance in a web site. +// GetInstanceInfo description for Gets all scale-out instances of an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// processID - pID. -// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the -// production slot. -// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON -// response from "GET api/sites/{siteName}/instances". -func (client AppsClient) GetInstanceProcessDumpSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (result ReadCloser, err error) { +// name - name of the app. +func (client AppsClient) GetInstanceInfo(ctx context.Context, resourceGroupName string, name string, instanceID string) (result SiteInstanceStatus, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcessDumpSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceInfo") defer func() { sc := -1 if result.Response.Response != nil { @@ -10946,38 +10961,36 @@ func (client AppsClient) GetInstanceProcessDumpSlot(ctx context.Context, resourc 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", "GetInstanceProcessDumpSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetInstanceInfo", err.Error()) } - req, err := client.GetInstanceProcessDumpSlotPreparer(ctx, resourceGroupName, name, processID, slot, instanceID) + req, err := client.GetInstanceInfoPreparer(ctx, resourceGroupName, name, instanceID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDumpSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceInfo", nil, "Failure preparing request") return } - resp, err := client.GetInstanceProcessDumpSlotSender(req) + resp, err := client.GetInstanceInfoSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDumpSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceInfo", resp, "Failure sending request") return } - result, err = client.GetInstanceProcessDumpSlotResponder(resp) + result, err = client.GetInstanceInfoResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDumpSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceInfo", resp, "Failure responding to request") } return } -// GetInstanceProcessDumpSlotPreparer prepares the GetInstanceProcessDumpSlot request. -func (client AppsClient) GetInstanceProcessDumpSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (*http.Request, error) { +// GetInstanceInfoPreparer prepares the GetInstanceInfo request. +func (client AppsClient) GetInstanceInfoPreparer(ctx context.Context, resourceGroupName string, name string, instanceID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "instanceId": autorest.Encode("path", instanceID), "name": autorest.Encode("path", name), - "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -10989,42 +11002,39 @@ func (client AppsClient) GetInstanceProcessDumpSlotPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetInstanceProcessDumpSlotSender sends the GetInstanceProcessDumpSlot request. The method will close the +// GetInstanceInfoSender sends the GetInstanceInfo request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetInstanceProcessDumpSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetInstanceInfoSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetInstanceProcessDumpSlotResponder handles the response to the GetInstanceProcessDumpSlot request. The method always +// GetInstanceInfoResponder handles the response to the GetInstanceInfo request. The method always // closes the http.Response Body. -func (client AppsClient) GetInstanceProcessDumpSlotResponder(resp *http.Response) (result ReadCloser, err error) { - result.Value = &resp.Body +func (client AppsClient) GetInstanceInfoResponder(resp *http.Response) (result SiteInstanceStatus, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound)) + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetInstanceProcessModule description for Get process information by its ID for a specific scaled-out instance in a -// web site. +// GetInstanceInfoSlot description for Gets all scale-out instances of an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// processID - pID. -// baseAddress - module base address. -// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON -// response from "GET api/sites/{siteName}/instances". -func (client AppsClient) GetInstanceProcessModule(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, instanceID string) (result ProcessModuleInfo, err error) { +// name - name of the app. +// slot - name of the deployment slot. If a slot is not specified, the API gets the production slot instances. +func (client AppsClient) GetInstanceInfoSlot(ctx context.Context, resourceGroupName string, name string, instanceID string, slot string) (result SiteInstanceStatus, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcessModule") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceInfoSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -11038,38 +11048,37 @@ func (client AppsClient) GetInstanceProcessModule(ctx context.Context, resourceG 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", "GetInstanceProcessModule", err.Error()) + return result, validation.NewError("web.AppsClient", "GetInstanceInfoSlot", err.Error()) } - req, err := client.GetInstanceProcessModulePreparer(ctx, resourceGroupName, name, processID, baseAddress, instanceID) + req, err := client.GetInstanceInfoSlotPreparer(ctx, resourceGroupName, name, instanceID, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModule", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceInfoSlot", nil, "Failure preparing request") return } - resp, err := client.GetInstanceProcessModuleSender(req) + resp, err := client.GetInstanceInfoSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModule", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceInfoSlot", resp, "Failure sending request") return } - result, err = client.GetInstanceProcessModuleResponder(resp) + result, err = client.GetInstanceInfoSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModule", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceInfoSlot", resp, "Failure responding to request") } return } -// GetInstanceProcessModulePreparer prepares the GetInstanceProcessModule request. -func (client AppsClient) GetInstanceProcessModulePreparer(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, instanceID string) (*http.Request, error) { +// GetInstanceInfoSlotPreparer prepares the GetInstanceInfoSlot request. +func (client AppsClient) GetInstanceInfoSlotPreparer(ctx context.Context, resourceGroupName string, name string, instanceID string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "baseAddress": autorest.Encode("path", baseAddress), "instanceId": autorest.Encode("path", instanceID), "name": autorest.Encode("path", name), - "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -11081,45 +11090,39 @@ func (client AppsClient) GetInstanceProcessModulePreparer(ctx context.Context, r preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetInstanceProcessModuleSender sends the GetInstanceProcessModule request. The method will close the +// GetInstanceInfoSlotSender sends the GetInstanceInfoSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetInstanceProcessModuleSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetInstanceInfoSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetInstanceProcessModuleResponder handles the response to the GetInstanceProcessModule request. The method always +// GetInstanceInfoSlotResponder handles the response to the GetInstanceInfoSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetInstanceProcessModuleResponder(resp *http.Response) (result ProcessModuleInfo, err error) { +func (client AppsClient) GetInstanceInfoSlotResponder(resp *http.Response) (result SiteInstanceStatus, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetInstanceProcessModuleSlot description for Get process information by its ID for a specific scaled-out instance in -// a web site. +// GetInstanceMSDeployLog description for Get the MSDeploy Log for the last MSDeploy operation. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// processID - pID. -// baseAddress - module base address. -// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the -// production slot. -// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON -// response from "GET api/sites/{siteName}/instances". -func (client AppsClient) GetInstanceProcessModuleSlot(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, slot string, instanceID string) (result ProcessModuleInfo, err error) { +// name - name of web app. +// instanceID - ID of web app instance. +func (client AppsClient) GetInstanceMSDeployLog(ctx context.Context, resourceGroupName string, name string, instanceID string) (result MSDeployLog, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcessModuleSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceMSDeployLog") defer func() { sc := -1 if result.Response.Response != nil { @@ -11133,39 +11136,36 @@ func (client AppsClient) GetInstanceProcessModuleSlot(ctx context.Context, resou 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", "GetInstanceProcessModuleSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetInstanceMSDeployLog", err.Error()) } - req, err := client.GetInstanceProcessModuleSlotPreparer(ctx, resourceGroupName, name, processID, baseAddress, slot, instanceID) + req, err := client.GetInstanceMSDeployLogPreparer(ctx, resourceGroupName, name, instanceID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModuleSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLog", nil, "Failure preparing request") return } - resp, err := client.GetInstanceProcessModuleSlotSender(req) + resp, err := client.GetInstanceMSDeployLogSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModuleSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLog", resp, "Failure sending request") return } - result, err = client.GetInstanceProcessModuleSlotResponder(resp) + result, err = client.GetInstanceMSDeployLogResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModuleSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLog", resp, "Failure responding to request") } return } -// GetInstanceProcessModuleSlotPreparer prepares the GetInstanceProcessModuleSlot request. -func (client AppsClient) GetInstanceProcessModuleSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, slot string, instanceID string) (*http.Request, error) { +// GetInstanceMSDeployLogPreparer prepares the GetInstanceMSDeployLog request. +func (client AppsClient) GetInstanceMSDeployLogPreparer(ctx context.Context, resourceGroupName string, name string, instanceID string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "baseAddress": autorest.Encode("path", baseAddress), "instanceId": autorest.Encode("path", instanceID), "name": autorest.Encode("path", name), - "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -11177,21 +11177,21 @@ func (client AppsClient) GetInstanceProcessModuleSlotPreparer(ctx context.Contex preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetInstanceProcessModuleSlotSender sends the GetInstanceProcessModuleSlot request. The method will close the +// GetInstanceMSDeployLogSender sends the GetInstanceMSDeployLog request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetInstanceProcessModuleSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetInstanceMSDeployLogSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetInstanceProcessModuleSlotResponder handles the response to the GetInstanceProcessModuleSlot request. The method always +// GetInstanceMSDeployLogResponder handles the response to the GetInstanceMSDeployLog request. The method always // closes the http.Response Body. -func (client AppsClient) GetInstanceProcessModuleSlotResponder(resp *http.Response) (result ProcessModuleInfo, err error) { +func (client AppsClient) GetInstanceMSDeployLogResponder(resp *http.Response) (result MSDeployLog, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -11202,19 +11202,15 @@ func (client AppsClient) GetInstanceProcessModuleSlotResponder(resp *http.Respon return } -// GetInstanceProcessSlot description for Get process information by its ID for a specific scaled-out instance in a web -// site. +// GetInstanceMSDeployLogSlot description for Get the MSDeploy Log for the last MSDeploy operation. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// processID - pID. -// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the -// production slot. -// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON -// response from "GET api/sites/{siteName}/instances". -func (client AppsClient) GetInstanceProcessSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (result ProcessInfo, err error) { +// name - name of web app. +// slot - name of web app slot. If not specified then will default to production slot. +// instanceID - ID of web app instance. +func (client AppsClient) GetInstanceMSDeployLogSlot(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (result MSDeployLog, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcessSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceMSDeployLogSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -11228,36 +11224,35 @@ func (client AppsClient) GetInstanceProcessSlot(ctx context.Context, resourceGro 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", "GetInstanceProcessSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetInstanceMSDeployLogSlot", err.Error()) } - req, err := client.GetInstanceProcessSlotPreparer(ctx, resourceGroupName, name, processID, slot, instanceID) + req, err := client.GetInstanceMSDeployLogSlotPreparer(ctx, resourceGroupName, name, slot, instanceID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLogSlot", nil, "Failure preparing request") return } - resp, err := client.GetInstanceProcessSlotSender(req) + resp, err := client.GetInstanceMSDeployLogSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLogSlot", resp, "Failure sending request") return } - result, err = client.GetInstanceProcessSlotResponder(resp) + result, err = client.GetInstanceMSDeployLogSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLogSlot", resp, "Failure responding to request") } return } -// GetInstanceProcessSlotPreparer prepares the GetInstanceProcessSlot request. -func (client AppsClient) GetInstanceProcessSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (*http.Request, error) { +// GetInstanceMSDeployLogSlotPreparer prepares the GetInstanceMSDeployLogSlot request. +func (client AppsClient) GetInstanceMSDeployLogSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "instanceId": autorest.Encode("path", instanceID), "name": autorest.Encode("path", name), - "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -11271,21 +11266,21 @@ func (client AppsClient) GetInstanceProcessSlotPreparer(ctx context.Context, res preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetInstanceProcessSlotSender sends the GetInstanceProcessSlot request. The method will close the +// GetInstanceMSDeployLogSlotSender sends the GetInstanceMSDeployLogSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetInstanceProcessSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetInstanceMSDeployLogSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetInstanceProcessSlotResponder handles the response to the GetInstanceProcessSlot request. The method always +// GetInstanceMSDeployLogSlotResponder handles the response to the GetInstanceMSDeployLogSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetInstanceProcessSlotResponder(resp *http.Response) (result ProcessInfo, err error) { +func (client AppsClient) GetInstanceMSDeployLogSlotResponder(resp *http.Response) (result MSDeployLog, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -11296,14 +11291,14 @@ func (client AppsClient) GetInstanceProcessSlotResponder(resp *http.Response) (r return } -// GetMigrateMySQLStatus description for Returns the status of MySql in app migration, if one is active, and whether or -// not MySql in app is enabled +// GetInstanceMsDeployStatus description for Get the status of the last MSDeploy operation. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of web app. -func (client AppsClient) GetMigrateMySQLStatus(ctx context.Context, resourceGroupName string, name string) (result MigrateMySQLStatus, err error) { +// instanceID - ID of web app instance. +func (client AppsClient) GetInstanceMsDeployStatus(ctx context.Context, resourceGroupName string, name string, instanceID string) (result MSDeployStatus, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetMigrateMySQLStatus") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceMsDeployStatus") defer func() { sc := -1 if result.Response.Response != nil { @@ -11317,33 +11312,34 @@ func (client AppsClient) GetMigrateMySQLStatus(ctx context.Context, resourceGrou 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", "GetMigrateMySQLStatus", err.Error()) + return result, validation.NewError("web.AppsClient", "GetInstanceMsDeployStatus", err.Error()) } - req, err := client.GetMigrateMySQLStatusPreparer(ctx, resourceGroupName, name) + req, err := client.GetInstanceMsDeployStatusPreparer(ctx, resourceGroupName, name, instanceID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatus", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatus", nil, "Failure preparing request") return } - resp, err := client.GetMigrateMySQLStatusSender(req) + resp, err := client.GetInstanceMsDeployStatusSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatus", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatus", resp, "Failure sending request") return } - result, err = client.GetMigrateMySQLStatusResponder(resp) + result, err = client.GetInstanceMsDeployStatusResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatus", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatus", resp, "Failure responding to request") } return } -// GetMigrateMySQLStatusPreparer prepares the GetMigrateMySQLStatus request. -func (client AppsClient) GetMigrateMySQLStatusPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// GetInstanceMsDeployStatusPreparer prepares the GetInstanceMsDeployStatus request. +func (client AppsClient) GetInstanceMsDeployStatusPreparer(ctx context.Context, resourceGroupName string, name string, instanceID string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -11357,21 +11353,21 @@ func (client AppsClient) GetMigrateMySQLStatusPreparer(ctx context.Context, reso preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetMigrateMySQLStatusSender sends the GetMigrateMySQLStatus request. The method will close the +// GetInstanceMsDeployStatusSender sends the GetInstanceMsDeployStatus request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetMigrateMySQLStatusSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetInstanceMsDeployStatusSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetMigrateMySQLStatusResponder handles the response to the GetMigrateMySQLStatus request. The method always +// GetInstanceMsDeployStatusResponder handles the response to the GetInstanceMsDeployStatus request. The method always // closes the http.Response Body. -func (client AppsClient) GetMigrateMySQLStatusResponder(resp *http.Response) (result MigrateMySQLStatus, err error) { +func (client AppsClient) GetInstanceMsDeployStatusResponder(resp *http.Response) (result MSDeployStatus, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -11382,15 +11378,15 @@ func (client AppsClient) GetMigrateMySQLStatusResponder(resp *http.Response) (re return } -// GetMigrateMySQLStatusSlot description for Returns the status of MySql in app migration, if one is active, and -// whether or not MySql in app is enabled +// GetInstanceMsDeployStatusSlot description for Get the status of the last MSDeploy operation. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of web app. -// slot - name of the deployment slot. -func (client AppsClient) GetMigrateMySQLStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result MigrateMySQLStatus, err error) { +// slot - name of web app slot. If not specified then will default to production slot. +// instanceID - ID of web app instance. +func (client AppsClient) GetInstanceMsDeployStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (result MSDeployStatus, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetMigrateMySQLStatusSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceMsDeployStatusSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -11404,33 +11400,34 @@ func (client AppsClient) GetMigrateMySQLStatusSlot(ctx context.Context, resource 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", "GetMigrateMySQLStatusSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetInstanceMsDeployStatusSlot", err.Error()) } - req, err := client.GetMigrateMySQLStatusSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.GetInstanceMsDeployStatusSlotPreparer(ctx, resourceGroupName, name, slot, instanceID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatusSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatusSlot", nil, "Failure preparing request") return } - resp, err := client.GetMigrateMySQLStatusSlotSender(req) + resp, err := client.GetInstanceMsDeployStatusSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatusSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatusSlot", resp, "Failure sending request") return } - result, err = client.GetMigrateMySQLStatusSlotResponder(resp) + result, err = client.GetInstanceMsDeployStatusSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatusSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatusSlot", resp, "Failure responding to request") } return } -// GetMigrateMySQLStatusSlotPreparer prepares the GetMigrateMySQLStatusSlot request. -func (client AppsClient) GetMigrateMySQLStatusSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// GetInstanceMsDeployStatusSlotPreparer prepares the GetInstanceMsDeployStatusSlot request. +func (client AppsClient) GetInstanceMsDeployStatusSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), @@ -11445,21 +11442,21 @@ func (client AppsClient) GetMigrateMySQLStatusSlotPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetMigrateMySQLStatusSlotSender sends the GetMigrateMySQLStatusSlot request. The method will close the +// GetInstanceMsDeployStatusSlotSender sends the GetInstanceMsDeployStatusSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetMigrateMySQLStatusSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetInstanceMsDeployStatusSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetMigrateMySQLStatusSlotResponder handles the response to the GetMigrateMySQLStatusSlot request. The method always +// GetInstanceMsDeployStatusSlotResponder handles the response to the GetInstanceMsDeployStatusSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetMigrateMySQLStatusSlotResponder(resp *http.Response) (result MigrateMySQLStatus, err error) { +func (client AppsClient) GetInstanceMsDeployStatusSlotResponder(resp *http.Response) (result MSDeployStatus, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -11470,13 +11467,17 @@ func (client AppsClient) GetMigrateMySQLStatusSlotResponder(resp *http.Response) return } -// GetMSDeployLog description for Get the MSDeploy Log for the last MSDeploy operation. +// GetInstanceProcess description for Get process information by its ID for a specific scaled-out instance in a web +// site. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of web app. -func (client AppsClient) GetMSDeployLog(ctx context.Context, resourceGroupName string, name string) (result MSDeployLog, err error) { +// name - site name. +// processID - pID. +// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON +// response from "GET api/sites/{siteName}/instances". +func (client AppsClient) GetInstanceProcess(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (result ProcessInfo, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetMSDeployLog") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcess") defer func() { sc := -1 if result.Response.Response != nil { @@ -11490,34 +11491,36 @@ func (client AppsClient) GetMSDeployLog(ctx context.Context, resourceGroupName s 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", "GetMSDeployLog", err.Error()) + return result, validation.NewError("web.AppsClient", "GetInstanceProcess", err.Error()) } - req, err := client.GetMSDeployLogPreparer(ctx, resourceGroupName, name) + req, err := client.GetInstanceProcessPreparer(ctx, resourceGroupName, name, processID, instanceID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLog", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcess", nil, "Failure preparing request") return } - resp, err := client.GetMSDeployLogSender(req) + resp, err := client.GetInstanceProcessSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLog", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcess", resp, "Failure sending request") return } - result, err = client.GetMSDeployLogResponder(resp) + result, err = client.GetInstanceProcessResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLog", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcess", resp, "Failure responding to request") } return } -// GetMSDeployLogPreparer prepares the GetMSDeployLog request. -func (client AppsClient) GetMSDeployLogPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// GetInstanceProcessPreparer prepares the GetInstanceProcess request. +func (client AppsClient) GetInstanceProcessPreparer(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -11530,21 +11533,21 @@ func (client AppsClient) GetMSDeployLogPreparer(ctx context.Context, resourceGro preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetMSDeployLogSender sends the GetMSDeployLog request. The method will close the +// GetInstanceProcessSender sends the GetInstanceProcess request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetMSDeployLogSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetInstanceProcessSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetMSDeployLogResponder handles the response to the GetMSDeployLog request. The method always +// GetInstanceProcessResponder handles the response to the GetInstanceProcess request. The method always // closes the http.Response Body. -func (client AppsClient) GetMSDeployLogResponder(resp *http.Response) (result MSDeployLog, err error) { +func (client AppsClient) GetInstanceProcessResponder(resp *http.Response) (result ProcessInfo, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -11555,14 +11558,17 @@ func (client AppsClient) GetMSDeployLogResponder(resp *http.Response) (result MS return } -// GetMSDeployLogSlot description for Get the MSDeploy Log for the last MSDeploy operation. +// GetInstanceProcessDump description for Get a memory dump of a process by its ID for a specific scaled-out instance +// in a web site. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of web app. -// slot - name of web app slot. If not specified then will default to production slot. -func (client AppsClient) GetMSDeployLogSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result MSDeployLog, err error) { +// name - site name. +// processID - pID. +// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON +// response from "GET api/sites/{siteName}/instances". +func (client AppsClient) GetInstanceProcessDump(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (result ReadCloser, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetMSDeployLogSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcessDump") defer func() { sc := -1 if result.Response.Response != nil { @@ -11576,36 +11582,37 @@ func (client AppsClient) GetMSDeployLogSlot(ctx context.Context, resourceGroupNa 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", "GetMSDeployLogSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetInstanceProcessDump", err.Error()) } - req, err := client.GetMSDeployLogSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.GetInstanceProcessDumpPreparer(ctx, resourceGroupName, name, processID, instanceID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLogSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDump", nil, "Failure preparing request") return } - resp, err := client.GetMSDeployLogSlotSender(req) + resp, err := client.GetInstanceProcessDumpSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLogSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDump", resp, "Failure sending request") return } - result, err = client.GetMSDeployLogSlotResponder(resp) + result, err = client.GetInstanceProcessDumpResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLogSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDump", resp, "Failure responding to request") } return } -// GetMSDeployLogSlotPreparer prepares the GetMSDeployLogSlot request. -func (client AppsClient) GetMSDeployLogSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// GetInstanceProcessDumpPreparer prepares the GetInstanceProcessDump request. +func (client AppsClient) GetInstanceProcessDumpPreparer(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -11617,38 +11624,43 @@ func (client AppsClient) GetMSDeployLogSlotPreparer(ctx context.Context, resourc preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetMSDeployLogSlotSender sends the GetMSDeployLogSlot request. The method will close the +// GetInstanceProcessDumpSender sends the GetInstanceProcessDump request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetMSDeployLogSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetInstanceProcessDumpSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetMSDeployLogSlotResponder handles the response to the GetMSDeployLogSlot request. The method always +// GetInstanceProcessDumpResponder handles the response to the GetInstanceProcessDump request. The method always // closes the http.Response Body. -func (client AppsClient) GetMSDeployLogSlotResponder(resp *http.Response) (result MSDeployLog, err error) { +func (client AppsClient) GetInstanceProcessDumpResponder(resp *http.Response) (result ReadCloser, err error) { + result.Value = &resp.Body err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound)) result.Response = autorest.Response{Response: resp} return } -// GetMSDeployStatus description for Get the status of the last MSDeploy operation. +// GetInstanceProcessDumpSlot description for Get a memory dump of a process by its ID for a specific scaled-out +// instance in a web site. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of web app. -func (client AppsClient) GetMSDeployStatus(ctx context.Context, resourceGroupName string, name string) (result MSDeployStatus, err error) { +// name - site name. +// processID - pID. +// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the +// production slot. +// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON +// response from "GET api/sites/{siteName}/instances". +func (client AppsClient) GetInstanceProcessDumpSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (result ReadCloser, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetMSDeployStatus") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcessDumpSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -11662,35 +11674,38 @@ func (client AppsClient) GetMSDeployStatus(ctx context.Context, resourceGroupNam 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", "GetMSDeployStatus", err.Error()) + return result, validation.NewError("web.AppsClient", "GetInstanceProcessDumpSlot", err.Error()) } - req, err := client.GetMSDeployStatusPreparer(ctx, resourceGroupName, name) + req, err := client.GetInstanceProcessDumpSlotPreparer(ctx, resourceGroupName, name, processID, slot, instanceID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatus", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDumpSlot", nil, "Failure preparing request") return } - resp, err := client.GetMSDeployStatusSender(req) + resp, err := client.GetInstanceProcessDumpSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatus", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDumpSlot", resp, "Failure sending request") return } - result, err = client.GetMSDeployStatusResponder(resp) + result, err = client.GetInstanceProcessDumpSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatus", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDumpSlot", resp, "Failure responding to request") } return } -// GetMSDeployStatusPreparer prepares the GetMSDeployStatus request. -func (client AppsClient) GetMSDeployStatusPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// GetInstanceProcessDumpSlotPreparer prepares the GetInstanceProcessDumpSlot request. +func (client AppsClient) GetInstanceProcessDumpSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -11702,39 +11717,42 @@ func (client AppsClient) GetMSDeployStatusPreparer(ctx context.Context, resource preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetMSDeployStatusSender sends the GetMSDeployStatus request. The method will close the +// GetInstanceProcessDumpSlotSender sends the GetInstanceProcessDumpSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetMSDeployStatusSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetInstanceProcessDumpSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetMSDeployStatusResponder handles the response to the GetMSDeployStatus request. The method always +// GetInstanceProcessDumpSlotResponder handles the response to the GetInstanceProcessDumpSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetMSDeployStatusResponder(resp *http.Response) (result MSDeployStatus, err error) { +func (client AppsClient) GetInstanceProcessDumpSlotResponder(resp *http.Response) (result ReadCloser, err error) { + result.Value = &resp.Body err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound)) result.Response = autorest.Response{Response: resp} return } -// GetMSDeployStatusSlot description for Get the status of the last MSDeploy operation. +// GetInstanceProcessModule description for Get process information by its ID for a specific scaled-out instance in a +// web site. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of web app. -// slot - name of web app slot. If not specified then will default to production slot. -func (client AppsClient) GetMSDeployStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result MSDeployStatus, err error) { +// name - site name. +// processID - pID. +// baseAddress - module base address. +// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON +// response from "GET api/sites/{siteName}/instances". +func (client AppsClient) GetInstanceProcessModule(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, instanceID string) (result ProcessModuleInfo, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetMSDeployStatusSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcessModule") defer func() { sc := -1 if result.Response.Response != nil { @@ -11748,36 +11766,38 @@ func (client AppsClient) GetMSDeployStatusSlot(ctx context.Context, resourceGrou 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", "GetMSDeployStatusSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetInstanceProcessModule", err.Error()) } - req, err := client.GetMSDeployStatusSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.GetInstanceProcessModulePreparer(ctx, resourceGroupName, name, processID, baseAddress, instanceID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatusSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModule", nil, "Failure preparing request") return } - resp, err := client.GetMSDeployStatusSlotSender(req) + resp, err := client.GetInstanceProcessModuleSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatusSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModule", resp, "Failure sending request") return } - result, err = client.GetMSDeployStatusSlotResponder(resp) + result, err = client.GetInstanceProcessModuleResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatusSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModule", resp, "Failure responding to request") } return } -// GetMSDeployStatusSlotPreparer prepares the GetMSDeployStatusSlot request. -func (client AppsClient) GetMSDeployStatusSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// GetInstanceProcessModulePreparer prepares the GetInstanceProcessModule request. +func (client AppsClient) GetInstanceProcessModulePreparer(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, instanceID string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "baseAddress": autorest.Encode("path", baseAddress), + "instanceId": autorest.Encode("path", instanceID), "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -11789,40 +11809,45 @@ func (client AppsClient) GetMSDeployStatusSlotPreparer(ctx context.Context, reso preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetMSDeployStatusSlotSender sends the GetMSDeployStatusSlot request. The method will close the +// GetInstanceProcessModuleSender sends the GetInstanceProcessModule request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetMSDeployStatusSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetInstanceProcessModuleSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetMSDeployStatusSlotResponder handles the response to the GetMSDeployStatusSlot request. The method always +// GetInstanceProcessModuleResponder handles the response to the GetInstanceProcessModule request. The method always // closes the http.Response Body. -func (client AppsClient) GetMSDeployStatusSlotResponder(resp *http.Response) (result MSDeployStatus, err error) { +func (client AppsClient) GetInstanceProcessModuleResponder(resp *http.Response) (result ProcessModuleInfo, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetNetworkTraceOperation description for Gets a named operation for a network trace capturing (or deployment slot, -// if specified). +// GetInstanceProcessModuleSlot description for Get process information by its ID for a specific scaled-out instance in +// a web site. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// operationID - GUID of the operation. -func (client AppsClient) GetNetworkTraceOperation(ctx context.Context, resourceGroupName string, name string, operationID string) (result ListNetworkTrace, err error) { +// name - site name. +// processID - pID. +// baseAddress - module base address. +// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the +// production slot. +// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON +// response from "GET api/sites/{siteName}/instances". +func (client AppsClient) GetInstanceProcessModuleSlot(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, slot string, instanceID string) (result ProcessModuleInfo, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTraceOperation") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcessModuleSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -11836,36 +11861,39 @@ func (client AppsClient) GetNetworkTraceOperation(ctx context.Context, resourceG 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", "GetNetworkTraceOperation", err.Error()) + return result, validation.NewError("web.AppsClient", "GetInstanceProcessModuleSlot", err.Error()) } - req, err := client.GetNetworkTraceOperationPreparer(ctx, resourceGroupName, name, operationID) + req, err := client.GetInstanceProcessModuleSlotPreparer(ctx, resourceGroupName, name, processID, baseAddress, slot, instanceID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperation", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModuleSlot", nil, "Failure preparing request") return } - resp, err := client.GetNetworkTraceOperationSender(req) + resp, err := client.GetInstanceProcessModuleSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperation", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModuleSlot", resp, "Failure sending request") return } - result, err = client.GetNetworkTraceOperationResponder(resp) + result, err = client.GetInstanceProcessModuleSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperation", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModuleSlot", resp, "Failure responding to request") } return } -// GetNetworkTraceOperationPreparer prepares the GetNetworkTraceOperation request. -func (client AppsClient) GetNetworkTraceOperationPreparer(ctx context.Context, resourceGroupName string, name string, operationID string) (*http.Request, error) { +// GetInstanceProcessModuleSlotPreparer prepares the GetInstanceProcessModuleSlot request. +func (client AppsClient) GetInstanceProcessModuleSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, slot string, instanceID string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "baseAddress": autorest.Encode("path", baseAddress), + "instanceId": autorest.Encode("path", instanceID), "name": autorest.Encode("path", name), - "operationId": autorest.Encode("path", operationID), + "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -11877,42 +11905,44 @@ func (client AppsClient) GetNetworkTraceOperationPreparer(ctx context.Context, r preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetNetworkTraceOperationSender sends the GetNetworkTraceOperation request. The method will close the +// GetInstanceProcessModuleSlotSender sends the GetInstanceProcessModuleSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetNetworkTraceOperationSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetInstanceProcessModuleSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetNetworkTraceOperationResponder handles the response to the GetNetworkTraceOperation request. The method always +// GetInstanceProcessModuleSlotResponder handles the response to the GetInstanceProcessModuleSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetNetworkTraceOperationResponder(resp *http.Response) (result ListNetworkTrace, err error) { +func (client AppsClient) GetInstanceProcessModuleSlotResponder(resp *http.Response) (result ProcessModuleInfo, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result.Value), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetNetworkTraceOperationSlot description for Gets a named operation for a network trace capturing (or deployment -// slot, if specified). +// GetInstanceProcessSlot description for Get process information by its ID for a specific scaled-out instance in a web +// site. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// operationID - GUID of the operation. -// slot - name of the deployment slot. If a slot is not specified, the API will get an operation for the +// name - site name. +// processID - pID. +// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the // production slot. -func (client AppsClient) GetNetworkTraceOperationSlot(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (result ListNetworkTrace, err error) { +// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON +// response from "GET api/sites/{siteName}/instances". +func (client AppsClient) GetInstanceProcessSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (result ProcessInfo, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTraceOperationSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcessSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -11926,35 +11956,36 @@ func (client AppsClient) GetNetworkTraceOperationSlot(ctx context.Context, resou 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", "GetNetworkTraceOperationSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetInstanceProcessSlot", err.Error()) } - req, err := client.GetNetworkTraceOperationSlotPreparer(ctx, resourceGroupName, name, operationID, slot) + req, err := client.GetInstanceProcessSlotPreparer(ctx, resourceGroupName, name, processID, slot, instanceID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessSlot", nil, "Failure preparing request") return } - resp, err := client.GetNetworkTraceOperationSlotSender(req) + resp, err := client.GetInstanceProcessSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessSlot", resp, "Failure sending request") return } - result, err = client.GetNetworkTraceOperationSlotResponder(resp) + result, err = client.GetInstanceProcessSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessSlot", resp, "Failure responding to request") } return } -// GetNetworkTraceOperationSlotPreparer prepares the GetNetworkTraceOperationSlot request. -func (client AppsClient) GetNetworkTraceOperationSlotPreparer(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (*http.Request, error) { +// GetInstanceProcessSlotPreparer prepares the GetInstanceProcessSlot request. +func (client AppsClient) GetInstanceProcessSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), "name": autorest.Encode("path", name), - "operationId": autorest.Encode("path", operationID), + "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -11968,42 +11999,39 @@ func (client AppsClient) GetNetworkTraceOperationSlotPreparer(ctx context.Contex preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetNetworkTraceOperationSlotSender sends the GetNetworkTraceOperationSlot request. The method will close the +// GetInstanceProcessSlotSender sends the GetInstanceProcessSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetNetworkTraceOperationSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetInstanceProcessSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetNetworkTraceOperationSlotResponder handles the response to the GetNetworkTraceOperationSlot request. The method always +// GetInstanceProcessSlotResponder handles the response to the GetInstanceProcessSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetNetworkTraceOperationSlotResponder(resp *http.Response) (result ListNetworkTrace, err error) { +func (client AppsClient) GetInstanceProcessSlotResponder(resp *http.Response) (result ProcessInfo, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result.Value), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetNetworkTraceOperationSlotV2 description for Gets a named operation for a network trace capturing (or deployment -// slot, if specified). +// GetMigrateMySQLStatus description for Returns the status of MySql in app migration, if one is active, and whether or +// not MySql in app is enabled // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// operationID - GUID of the operation. -// slot - name of the deployment slot. If a slot is not specified, the API will get an operation for the -// production slot. -func (client AppsClient) GetNetworkTraceOperationSlotV2(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (result ListNetworkTrace, err error) { +// name - name of web app. +func (client AppsClient) GetMigrateMySQLStatus(ctx context.Context, resourceGroupName string, name string) (result MigrateMySQLStatus, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTraceOperationSlotV2") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetMigrateMySQLStatus") defer func() { sc := -1 if result.Response.Response != nil { @@ -12017,37 +12045,35 @@ func (client AppsClient) GetNetworkTraceOperationSlotV2(ctx context.Context, res 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", "GetNetworkTraceOperationSlotV2", err.Error()) + return result, validation.NewError("web.AppsClient", "GetMigrateMySQLStatus", err.Error()) } - req, err := client.GetNetworkTraceOperationSlotV2Preparer(ctx, resourceGroupName, name, operationID, slot) + req, err := client.GetMigrateMySQLStatusPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationSlotV2", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatus", nil, "Failure preparing request") return } - resp, err := client.GetNetworkTraceOperationSlotV2Sender(req) + resp, err := client.GetMigrateMySQLStatusSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationSlotV2", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatus", resp, "Failure sending request") return } - result, err = client.GetNetworkTraceOperationSlotV2Responder(resp) + result, err = client.GetMigrateMySQLStatusResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationSlotV2", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatus", resp, "Failure responding to request") } return } -// GetNetworkTraceOperationSlotV2Preparer prepares the GetNetworkTraceOperationSlotV2 request. -func (client AppsClient) GetNetworkTraceOperationSlotV2Preparer(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (*http.Request, error) { +// GetMigrateMySQLStatusPreparer prepares the GetMigrateMySQLStatus request. +func (client AppsClient) GetMigrateMySQLStatusPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), - "operationId": autorest.Encode("path", operationID), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -12059,40 +12085,40 @@ func (client AppsClient) GetNetworkTraceOperationSlotV2Preparer(ctx context.Cont preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetNetworkTraceOperationSlotV2Sender sends the GetNetworkTraceOperationSlotV2 request. The method will close the +// GetMigrateMySQLStatusSender sends the GetMigrateMySQLStatus request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetNetworkTraceOperationSlotV2Sender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetMigrateMySQLStatusSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetNetworkTraceOperationSlotV2Responder handles the response to the GetNetworkTraceOperationSlotV2 request. The method always +// GetMigrateMySQLStatusResponder handles the response to the GetMigrateMySQLStatus request. The method always // closes the http.Response Body. -func (client AppsClient) GetNetworkTraceOperationSlotV2Responder(resp *http.Response) (result ListNetworkTrace, err error) { +func (client AppsClient) GetMigrateMySQLStatusResponder(resp *http.Response) (result MigrateMySQLStatus, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result.Value), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetNetworkTraceOperationV2 description for Gets a named operation for a network trace capturing (or deployment slot, -// if specified). +// GetMigrateMySQLStatusSlot description for Returns the status of MySql in app migration, if one is active, and +// whether or not MySql in app is enabled // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// operationID - GUID of the operation. -func (client AppsClient) GetNetworkTraceOperationV2(ctx context.Context, resourceGroupName string, name string, operationID string) (result ListNetworkTrace, err error) { +// name - name of web app. +// slot - name of the deployment slot. +func (client AppsClient) GetMigrateMySQLStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result MigrateMySQLStatus, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTraceOperationV2") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetMigrateMySQLStatusSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -12106,36 +12132,36 @@ func (client AppsClient) GetNetworkTraceOperationV2(ctx context.Context, resourc 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", "GetNetworkTraceOperationV2", err.Error()) + return result, validation.NewError("web.AppsClient", "GetMigrateMySQLStatusSlot", err.Error()) } - req, err := client.GetNetworkTraceOperationV2Preparer(ctx, resourceGroupName, name, operationID) + req, err := client.GetMigrateMySQLStatusSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationV2", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatusSlot", nil, "Failure preparing request") return } - resp, err := client.GetNetworkTraceOperationV2Sender(req) + resp, err := client.GetMigrateMySQLStatusSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationV2", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatusSlot", resp, "Failure sending request") return } - result, err = client.GetNetworkTraceOperationV2Responder(resp) + result, err = client.GetMigrateMySQLStatusSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationV2", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatusSlot", resp, "Failure responding to request") } return } -// GetNetworkTraceOperationV2Preparer prepares the GetNetworkTraceOperationV2 request. -func (client AppsClient) GetNetworkTraceOperationV2Preparer(ctx context.Context, resourceGroupName string, name string, operationID string) (*http.Request, error) { +// GetMigrateMySQLStatusSlotPreparer prepares the GetMigrateMySQLStatusSlot request. +func (client AppsClient) GetMigrateMySQLStatusSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), - "operationId": autorest.Encode("path", operationID), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -12147,40 +12173,38 @@ func (client AppsClient) GetNetworkTraceOperationV2Preparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetNetworkTraceOperationV2Sender sends the GetNetworkTraceOperationV2 request. The method will close the +// GetMigrateMySQLStatusSlotSender sends the GetMigrateMySQLStatusSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetNetworkTraceOperationV2Sender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetMigrateMySQLStatusSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetNetworkTraceOperationV2Responder handles the response to the GetNetworkTraceOperationV2 request. The method always +// GetMigrateMySQLStatusSlotResponder handles the response to the GetMigrateMySQLStatusSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetNetworkTraceOperationV2Responder(resp *http.Response) (result ListNetworkTrace, err error) { +func (client AppsClient) GetMigrateMySQLStatusSlotResponder(resp *http.Response) (result MigrateMySQLStatus, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result.Value), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetNetworkTraces description for Gets a named operation for a network trace capturing (or deployment slot, if -// specified). +// GetMSDeployLog description for Get the MSDeploy Log for the last MSDeploy operation. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// operationID - GUID of the operation. -func (client AppsClient) GetNetworkTraces(ctx context.Context, resourceGroupName string, name string, operationID string) (result ListNetworkTrace, err error) { +// name - name of web app. +func (client AppsClient) GetMSDeployLog(ctx context.Context, resourceGroupName string, name string) (result MSDeployLog, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTraces") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetMSDeployLog") defer func() { sc := -1 if result.Response.Response != nil { @@ -12194,35 +12218,34 @@ func (client AppsClient) GetNetworkTraces(ctx context.Context, 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", "GetNetworkTraces", err.Error()) + return result, validation.NewError("web.AppsClient", "GetMSDeployLog", err.Error()) } - req, err := client.GetNetworkTracesPreparer(ctx, resourceGroupName, name, operationID) + req, err := client.GetMSDeployLogPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraces", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLog", nil, "Failure preparing request") return } - resp, err := client.GetNetworkTracesSender(req) + resp, err := client.GetMSDeployLogSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraces", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLog", resp, "Failure sending request") return } - result, err = client.GetNetworkTracesResponder(resp) + result, err = client.GetMSDeployLogResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraces", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLog", resp, "Failure responding to request") } return } -// GetNetworkTracesPreparer prepares the GetNetworkTraces request. -func (client AppsClient) GetNetworkTracesPreparer(ctx context.Context, resourceGroupName string, name string, operationID string) (*http.Request, error) { +// GetMSDeployLogPreparer prepares the GetMSDeployLog request. +func (client AppsClient) GetMSDeployLogPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), - "operationId": autorest.Encode("path", operationID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -12235,42 +12258,39 @@ func (client AppsClient) GetNetworkTracesPreparer(ctx context.Context, resourceG preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetNetworkTracesSender sends the GetNetworkTraces request. The method will close the +// GetMSDeployLogSender sends the GetMSDeployLog request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetNetworkTracesSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetMSDeployLogSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetNetworkTracesResponder handles the response to the GetNetworkTraces request. The method always +// GetMSDeployLogResponder handles the response to the GetMSDeployLog request. The method always // closes the http.Response Body. -func (client AppsClient) GetNetworkTracesResponder(resp *http.Response) (result ListNetworkTrace, err error) { +func (client AppsClient) GetMSDeployLogResponder(resp *http.Response) (result MSDeployLog, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Value), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetNetworkTracesSlot description for Gets a named operation for a network trace capturing (or deployment slot, if -// specified). +// GetMSDeployLogSlot description for Get the MSDeploy Log for the last MSDeploy operation. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// operationID - GUID of the operation. -// slot - name of the deployment slot. If a slot is not specified, the API will get an operation for the -// production slot. -func (client AppsClient) GetNetworkTracesSlot(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (result ListNetworkTrace, err error) { +// name - name of web app. +// slot - name of web app slot. If not specified then will default to production slot. +func (client AppsClient) GetMSDeployLogSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result MSDeployLog, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTracesSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetMSDeployLogSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -12284,35 +12304,34 @@ func (client AppsClient) GetNetworkTracesSlot(ctx context.Context, resourceGroup 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", "GetNetworkTracesSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetMSDeployLogSlot", err.Error()) } - req, err := client.GetNetworkTracesSlotPreparer(ctx, resourceGroupName, name, operationID, slot) + req, err := client.GetMSDeployLogSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLogSlot", nil, "Failure preparing request") return } - resp, err := client.GetNetworkTracesSlotSender(req) + resp, err := client.GetMSDeployLogSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLogSlot", resp, "Failure sending request") return } - result, err = client.GetNetworkTracesSlotResponder(resp) + result, err = client.GetMSDeployLogSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLogSlot", resp, "Failure responding to request") } return } -// GetNetworkTracesSlotPreparer prepares the GetNetworkTracesSlot request. -func (client AppsClient) GetNetworkTracesSlotPreparer(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (*http.Request, error) { +// GetMSDeployLogSlotPreparer prepares the GetMSDeployLogSlot request. +func (client AppsClient) GetMSDeployLogSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), - "operationId": autorest.Encode("path", operationID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -12326,42 +12345,38 @@ func (client AppsClient) GetNetworkTracesSlotPreparer(ctx context.Context, resou preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetNetworkTracesSlotSender sends the GetNetworkTracesSlot request. The method will close the +// GetMSDeployLogSlotSender sends the GetMSDeployLogSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetNetworkTracesSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetMSDeployLogSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetNetworkTracesSlotResponder handles the response to the GetNetworkTracesSlot request. The method always +// GetMSDeployLogSlotResponder handles the response to the GetMSDeployLogSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetNetworkTracesSlotResponder(resp *http.Response) (result ListNetworkTrace, err error) { +func (client AppsClient) GetMSDeployLogSlotResponder(resp *http.Response) (result MSDeployLog, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Value), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetNetworkTracesSlotV2 description for Gets a named operation for a network trace capturing (or deployment slot, if -// specified). +// GetMSDeployStatus description for Get the status of the last MSDeploy operation. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// operationID - GUID of the operation. -// slot - name of the deployment slot. If a slot is not specified, the API will get an operation for the -// production slot. -func (client AppsClient) GetNetworkTracesSlotV2(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (result ListNetworkTrace, err error) { +// name - name of web app. +func (client AppsClient) GetMSDeployStatus(ctx context.Context, resourceGroupName string, name string) (result MSDeployStatus, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTracesSlotV2") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetMSDeployStatus") defer func() { sc := -1 if result.Response.Response != nil { @@ -12375,37 +12390,35 @@ func (client AppsClient) GetNetworkTracesSlotV2(ctx context.Context, resourceGro 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", "GetNetworkTracesSlotV2", err.Error()) + return result, validation.NewError("web.AppsClient", "GetMSDeployStatus", err.Error()) } - req, err := client.GetNetworkTracesSlotV2Preparer(ctx, resourceGroupName, name, operationID, slot) + req, err := client.GetMSDeployStatusPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesSlotV2", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatus", nil, "Failure preparing request") return } - resp, err := client.GetNetworkTracesSlotV2Sender(req) + resp, err := client.GetMSDeployStatusSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesSlotV2", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatus", resp, "Failure sending request") return } - result, err = client.GetNetworkTracesSlotV2Responder(resp) + result, err = client.GetMSDeployStatusResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesSlotV2", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatus", resp, "Failure responding to request") } return } -// GetNetworkTracesSlotV2Preparer prepares the GetNetworkTracesSlotV2 request. -func (client AppsClient) GetNetworkTracesSlotV2Preparer(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (*http.Request, error) { +// GetMSDeployStatusPreparer prepares the GetMSDeployStatus request. +func (client AppsClient) GetMSDeployStatusPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), - "operationId": autorest.Encode("path", operationID), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -12417,40 +12430,39 @@ func (client AppsClient) GetNetworkTracesSlotV2Preparer(ctx context.Context, res preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetNetworkTracesSlotV2Sender sends the GetNetworkTracesSlotV2 request. The method will close the +// GetMSDeployStatusSender sends the GetMSDeployStatus request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetNetworkTracesSlotV2Sender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetMSDeployStatusSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetNetworkTracesSlotV2Responder handles the response to the GetNetworkTracesSlotV2 request. The method always +// GetMSDeployStatusResponder handles the response to the GetMSDeployStatus request. The method always // closes the http.Response Body. -func (client AppsClient) GetNetworkTracesSlotV2Responder(resp *http.Response) (result ListNetworkTrace, err error) { +func (client AppsClient) GetMSDeployStatusResponder(resp *http.Response) (result MSDeployStatus, err error) { err = autorest.Respond( resp, client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetNetworkTracesV2 description for Gets a named operation for a network trace capturing (or deployment slot, if -// specified). +// GetMSDeployStatusSlot description for Get the status of the last MSDeploy operation. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// operationID - GUID of the operation. -func (client AppsClient) GetNetworkTracesV2(ctx context.Context, resourceGroupName string, name string, operationID string) (result ListNetworkTrace, err error) { +// name - name of web app. +// slot - name of web app slot. If not specified then will default to production slot. +func (client AppsClient) GetMSDeployStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result MSDeployStatus, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTracesV2") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetMSDeployStatusSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -12464,36 +12476,36 @@ func (client AppsClient) GetNetworkTracesV2(ctx context.Context, resourceGroupNa 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", "GetNetworkTracesV2", err.Error()) + return result, validation.NewError("web.AppsClient", "GetMSDeployStatusSlot", err.Error()) } - req, err := client.GetNetworkTracesV2Preparer(ctx, resourceGroupName, name, operationID) + req, err := client.GetMSDeployStatusSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesV2", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatusSlot", nil, "Failure preparing request") return } - resp, err := client.GetNetworkTracesV2Sender(req) + resp, err := client.GetMSDeployStatusSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesV2", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatusSlot", resp, "Failure sending request") return } - result, err = client.GetNetworkTracesV2Responder(resp) + result, err = client.GetMSDeployStatusSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesV2", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatusSlot", resp, "Failure responding to request") } return } -// GetNetworkTracesV2Preparer prepares the GetNetworkTracesV2 request. -func (client AppsClient) GetNetworkTracesV2Preparer(ctx context.Context, resourceGroupName string, name string, operationID string) (*http.Request, error) { +// GetMSDeployStatusSlotPreparer prepares the GetMSDeployStatusSlot request. +func (client AppsClient) GetMSDeployStatusSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), - "operationId": autorest.Encode("path", operationID), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -12505,39 +12517,40 @@ func (client AppsClient) GetNetworkTracesV2Preparer(ctx context.Context, resourc preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetNetworkTracesV2Sender sends the GetNetworkTracesV2 request. The method will close the +// GetMSDeployStatusSlotSender sends the GetMSDeployStatusSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetNetworkTracesV2Sender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetMSDeployStatusSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetNetworkTracesV2Responder handles the response to the GetNetworkTracesV2 request. The method always +// GetMSDeployStatusSlotResponder handles the response to the GetMSDeployStatusSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetNetworkTracesV2Responder(resp *http.Response) (result ListNetworkTrace, err error) { +func (client AppsClient) GetMSDeployStatusSlotResponder(resp *http.Response) (result MSDeployStatus, err error) { err = autorest.Respond( resp, client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetPremierAddOn description for Gets a named add-on of an app. -// Parameters: +// GetNetworkTraceOperation description for Gets a named operation for a network trace capturing (or deployment slot, +// if specified). +// Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// premierAddOnName - add-on name. -func (client AppsClient) GetPremierAddOn(ctx context.Context, resourceGroupName string, name string, premierAddOnName string) (result PremierAddOn, err error) { +// operationID - GUID of the operation. +func (client AppsClient) GetNetworkTraceOperation(ctx context.Context, resourceGroupName string, name string, operationID string) (result ListNetworkTrace, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPremierAddOn") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTraceOperation") defer func() { sc := -1 if result.Response.Response != nil { @@ -12551,35 +12564,35 @@ func (client AppsClient) GetPremierAddOn(ctx context.Context, 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", "GetPremierAddOn", err.Error()) + return result, validation.NewError("web.AppsClient", "GetNetworkTraceOperation", err.Error()) } - req, err := client.GetPremierAddOnPreparer(ctx, resourceGroupName, name, premierAddOnName) + req, err := client.GetNetworkTraceOperationPreparer(ctx, resourceGroupName, name, operationID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPremierAddOn", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperation", nil, "Failure preparing request") return } - resp, err := client.GetPremierAddOnSender(req) + resp, err := client.GetNetworkTraceOperationSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPremierAddOn", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperation", resp, "Failure sending request") return } - result, err = client.GetPremierAddOnResponder(resp) + result, err = client.GetNetworkTraceOperationResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPremierAddOn", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperation", resp, "Failure responding to request") } return } -// GetPremierAddOnPreparer prepares the GetPremierAddOn request. -func (client AppsClient) GetPremierAddOnPreparer(ctx context.Context, resourceGroupName string, name string, premierAddOnName string) (*http.Request, error) { +// GetNetworkTraceOperationPreparer prepares the GetNetworkTraceOperation request. +func (client AppsClient) GetNetworkTraceOperationPreparer(ctx context.Context, resourceGroupName string, name string, operationID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), - "premierAddOnName": autorest.Encode("path", premierAddOnName), + "operationId": autorest.Encode("path", operationID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -12592,41 +12605,42 @@ func (client AppsClient) GetPremierAddOnPreparer(ctx context.Context, resourceGr preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetPremierAddOnSender sends the GetPremierAddOn request. The method will close the +// GetNetworkTraceOperationSender sends the GetNetworkTraceOperation request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetPremierAddOnSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetNetworkTraceOperationSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetPremierAddOnResponder handles the response to the GetPremierAddOn request. The method always +// GetNetworkTraceOperationResponder handles the response to the GetNetworkTraceOperation request. The method always // closes the http.Response Body. -func (client AppsClient) GetPremierAddOnResponder(resp *http.Response) (result PremierAddOn, err error) { +func (client AppsClient) GetNetworkTraceOperationResponder(resp *http.Response) (result ListNetworkTrace, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result.Value), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetPremierAddOnSlot description for Gets a named add-on of an app. +// GetNetworkTraceOperationSlot description for Gets a named operation for a network trace capturing (or deployment +// slot, if specified). // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// premierAddOnName - add-on name. -// slot - name of the deployment slot. If a slot is not specified, the API will get the named add-on for the +// operationID - GUID of the operation. +// slot - name of the deployment slot. If a slot is not specified, the API will get an operation for the // production slot. -func (client AppsClient) GetPremierAddOnSlot(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string) (result PremierAddOn, err error) { +func (client AppsClient) GetNetworkTraceOperationSlot(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (result ListNetworkTrace, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPremierAddOnSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTraceOperationSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -12640,35 +12654,35 @@ func (client AppsClient) GetPremierAddOnSlot(ctx context.Context, resourceGroupN 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", "GetPremierAddOnSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetNetworkTraceOperationSlot", err.Error()) } - req, err := client.GetPremierAddOnSlotPreparer(ctx, resourceGroupName, name, premierAddOnName, slot) + req, err := client.GetNetworkTraceOperationSlotPreparer(ctx, resourceGroupName, name, operationID, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPremierAddOnSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationSlot", nil, "Failure preparing request") return } - resp, err := client.GetPremierAddOnSlotSender(req) + resp, err := client.GetNetworkTraceOperationSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPremierAddOnSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationSlot", resp, "Failure sending request") return } - result, err = client.GetPremierAddOnSlotResponder(resp) + result, err = client.GetNetworkTraceOperationSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPremierAddOnSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationSlot", resp, "Failure responding to request") } return } -// GetPremierAddOnSlotPreparer prepares the GetPremierAddOnSlot request. -func (client AppsClient) GetPremierAddOnSlotPreparer(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string) (*http.Request, error) { +// GetNetworkTraceOperationSlotPreparer prepares the GetNetworkTraceOperationSlot request. +func (client AppsClient) GetNetworkTraceOperationSlotPreparer(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), - "premierAddOnName": autorest.Encode("path", premierAddOnName), + "operationId": autorest.Encode("path", operationID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -12682,39 +12696,42 @@ func (client AppsClient) GetPremierAddOnSlotPreparer(ctx context.Context, resour preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetPremierAddOnSlotSender sends the GetPremierAddOnSlot request. The method will close the +// GetNetworkTraceOperationSlotSender sends the GetNetworkTraceOperationSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetPremierAddOnSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetNetworkTraceOperationSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetPremierAddOnSlotResponder handles the response to the GetPremierAddOnSlot request. The method always +// GetNetworkTraceOperationSlotResponder handles the response to the GetNetworkTraceOperationSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetPremierAddOnSlotResponder(resp *http.Response) (result PremierAddOn, err error) { +func (client AppsClient) GetNetworkTraceOperationSlotResponder(resp *http.Response) (result ListNetworkTrace, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result.Value), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetPrivateAccess description for Gets data around private site access enablement and authorized Virtual Networks -// that can access the site. +// GetNetworkTraceOperationSlotV2 description for Gets a named operation for a network trace capturing (or deployment +// slot, if specified). // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - the name of the web app. -func (client AppsClient) GetPrivateAccess(ctx context.Context, resourceGroupName string, name string) (result PrivateAccess, err error) { +// name - name of the app. +// operationID - GUID of the operation. +// slot - name of the deployment slot. If a slot is not specified, the API will get an operation for the +// production slot. +func (client AppsClient) GetNetworkTraceOperationSlotV2(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (result ListNetworkTrace, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPrivateAccess") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTraceOperationSlotV2") defer func() { sc := -1 if result.Response.Response != nil { @@ -12728,35 +12745,37 @@ func (client AppsClient) GetPrivateAccess(ctx context.Context, 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", "GetPrivateAccess", err.Error()) + return result, validation.NewError("web.AppsClient", "GetNetworkTraceOperationSlotV2", err.Error()) } - req, err := client.GetPrivateAccessPreparer(ctx, resourceGroupName, name) + req, err := client.GetNetworkTraceOperationSlotV2Preparer(ctx, resourceGroupName, name, operationID, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateAccess", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationSlotV2", nil, "Failure preparing request") return } - resp, err := client.GetPrivateAccessSender(req) + resp, err := client.GetNetworkTraceOperationSlotV2Sender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateAccess", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationSlotV2", resp, "Failure sending request") return } - result, err = client.GetPrivateAccessResponder(resp) + result, err = client.GetNetworkTraceOperationSlotV2Responder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateAccess", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationSlotV2", resp, "Failure responding to request") } return } -// GetPrivateAccessPreparer prepares the GetPrivateAccess request. -func (client AppsClient) GetPrivateAccessPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// GetNetworkTraceOperationSlotV2Preparer prepares the GetNetworkTraceOperationSlotV2 request. +func (client AppsClient) GetNetworkTraceOperationSlotV2Preparer(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), + "operationId": autorest.Encode("path", operationID), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -12768,40 +12787,40 @@ func (client AppsClient) GetPrivateAccessPreparer(ctx context.Context, resourceG preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetPrivateAccessSender sends the GetPrivateAccess request. The method will close the +// GetNetworkTraceOperationSlotV2Sender sends the GetNetworkTraceOperationSlotV2 request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetPrivateAccessSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetNetworkTraceOperationSlotV2Sender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetPrivateAccessResponder handles the response to the GetPrivateAccess request. The method always +// GetNetworkTraceOperationSlotV2Responder handles the response to the GetNetworkTraceOperationSlotV2 request. The method always // closes the http.Response Body. -func (client AppsClient) GetPrivateAccessResponder(resp *http.Response) (result PrivateAccess, err error) { +func (client AppsClient) GetNetworkTraceOperationSlotV2Responder(resp *http.Response) (result ListNetworkTrace, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result.Value), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetPrivateAccessSlot description for Gets data around private site access enablement and authorized Virtual Networks -// that can access the site. +// GetNetworkTraceOperationV2 description for Gets a named operation for a network trace capturing (or deployment slot, +// if specified). // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - the name of the web app. -// slot - the name of the slot for the web app. -func (client AppsClient) GetPrivateAccessSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result PrivateAccess, err error) { +// name - name of the app. +// operationID - GUID of the operation. +func (client AppsClient) GetNetworkTraceOperationV2(ctx context.Context, resourceGroupName string, name string, operationID string) (result ListNetworkTrace, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPrivateAccessSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTraceOperationV2") defer func() { sc := -1 if result.Response.Response != nil { @@ -12815,36 +12834,36 @@ func (client AppsClient) GetPrivateAccessSlot(ctx context.Context, resourceGroup 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", "GetPrivateAccessSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetNetworkTraceOperationV2", err.Error()) } - req, err := client.GetPrivateAccessSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.GetNetworkTraceOperationV2Preparer(ctx, resourceGroupName, name, operationID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateAccessSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationV2", nil, "Failure preparing request") return } - resp, err := client.GetPrivateAccessSlotSender(req) + resp, err := client.GetNetworkTraceOperationV2Sender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateAccessSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationV2", resp, "Failure sending request") return } - result, err = client.GetPrivateAccessSlotResponder(resp) + result, err = client.GetNetworkTraceOperationV2Responder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateAccessSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationV2", resp, "Failure responding to request") } return } -// GetPrivateAccessSlotPreparer prepares the GetPrivateAccessSlot request. -func (client AppsClient) GetPrivateAccessSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// GetNetworkTraceOperationV2Preparer prepares the GetNetworkTraceOperationV2 request. +func (client AppsClient) GetNetworkTraceOperationV2Preparer(ctx context.Context, resourceGroupName string, name string, operationID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), + "operationId": autorest.Encode("path", operationID), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -12856,39 +12875,40 @@ func (client AppsClient) GetPrivateAccessSlotPreparer(ctx context.Context, resou preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetPrivateAccessSlotSender sends the GetPrivateAccessSlot request. The method will close the +// GetNetworkTraceOperationV2Sender sends the GetNetworkTraceOperationV2 request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetPrivateAccessSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetNetworkTraceOperationV2Sender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetPrivateAccessSlotResponder handles the response to the GetPrivateAccessSlot request. The method always +// GetNetworkTraceOperationV2Responder handles the response to the GetNetworkTraceOperationV2 request. The method always // closes the http.Response Body. -func (client AppsClient) GetPrivateAccessSlotResponder(resp *http.Response) (result PrivateAccess, err error) { +func (client AppsClient) GetNetworkTraceOperationV2Responder(resp *http.Response) (result ListNetworkTrace, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result.Value), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetProcess description for Get process information by its ID for a specific scaled-out instance in a web site. +// GetNetworkTraces description for Gets a named operation for a network trace capturing (or deployment slot, if +// specified). // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// processID - pID. -func (client AppsClient) GetProcess(ctx context.Context, resourceGroupName string, name string, processID string) (result ProcessInfo, err error) { +// name - name of the app. +// operationID - GUID of the operation. +func (client AppsClient) GetNetworkTraces(ctx context.Context, resourceGroupName string, name string, operationID string) (result ListNetworkTrace, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcess") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTraces") defer func() { sc := -1 if result.Response.Response != nil { @@ -12902,35 +12922,35 @@ func (client AppsClient) GetProcess(ctx context.Context, resourceGroupName strin 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", "GetProcess", err.Error()) + return result, validation.NewError("web.AppsClient", "GetNetworkTraces", err.Error()) } - req, err := client.GetProcessPreparer(ctx, resourceGroupName, name, processID) + req, err := client.GetNetworkTracesPreparer(ctx, resourceGroupName, name, operationID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcess", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraces", nil, "Failure preparing request") return } - resp, err := client.GetProcessSender(req) + resp, err := client.GetNetworkTracesSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcess", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraces", resp, "Failure sending request") return } - result, err = client.GetProcessResponder(resp) + result, err = client.GetNetworkTracesResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcess", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraces", resp, "Failure responding to request") } return } -// GetProcessPreparer prepares the GetProcess request. -func (client AppsClient) GetProcessPreparer(ctx context.Context, resourceGroupName string, name string, processID string) (*http.Request, error) { +// GetNetworkTracesPreparer prepares the GetNetworkTraces request. +func (client AppsClient) GetNetworkTracesPreparer(ctx context.Context, resourceGroupName string, name string, operationID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), - "processId": autorest.Encode("path", processID), + "operationId": autorest.Encode("path", operationID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -12943,40 +12963,42 @@ func (client AppsClient) GetProcessPreparer(ctx context.Context, resourceGroupNa preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetProcessSender sends the GetProcess request. The method will close the +// GetNetworkTracesSender sends the GetNetworkTraces request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetProcessSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetNetworkTracesSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetProcessResponder handles the response to the GetProcess request. The method always +// GetNetworkTracesResponder handles the response to the GetNetworkTraces request. The method always // closes the http.Response Body. -func (client AppsClient) GetProcessResponder(resp *http.Response) (result ProcessInfo, err error) { +func (client AppsClient) GetNetworkTracesResponder(resp *http.Response) (result ListNetworkTrace, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), - autorest.ByUnmarshallingJSON(&result), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetProcessDump description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web -// site. +// GetNetworkTracesSlot description for Gets a named operation for a network trace capturing (or deployment slot, if +// specified). // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// processID - pID. -func (client AppsClient) GetProcessDump(ctx context.Context, resourceGroupName string, name string, processID string) (result ReadCloser, err error) { +// name - name of the app. +// operationID - GUID of the operation. +// slot - name of the deployment slot. If a slot is not specified, the API will get an operation for the +// production slot. +func (client AppsClient) GetNetworkTracesSlot(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (result ListNetworkTrace, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcessDump") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTracesSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -12990,36 +13012,37 @@ func (client AppsClient) GetProcessDump(ctx context.Context, resourceGroupName s 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", "GetProcessDump", err.Error()) + return result, validation.NewError("web.AppsClient", "GetNetworkTracesSlot", err.Error()) } - req, err := client.GetProcessDumpPreparer(ctx, resourceGroupName, name, processID) + req, err := client.GetNetworkTracesSlotPreparer(ctx, resourceGroupName, name, operationID, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDump", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesSlot", nil, "Failure preparing request") return } - resp, err := client.GetProcessDumpSender(req) + resp, err := client.GetNetworkTracesSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDump", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesSlot", resp, "Failure sending request") return } - result, err = client.GetProcessDumpResponder(resp) + result, err = client.GetNetworkTracesSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDump", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesSlot", resp, "Failure responding to request") } return } -// GetProcessDumpPreparer prepares the GetProcessDump request. -func (client AppsClient) GetProcessDumpPreparer(ctx context.Context, resourceGroupName string, name string, processID string) (*http.Request, error) { +// GetNetworkTracesSlotPreparer prepares the GetNetworkTracesSlot request. +func (client AppsClient) GetNetworkTracesSlotPreparer(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), - "processId": autorest.Encode("path", processID), + "operationId": autorest.Encode("path", operationID), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -13031,41 +13054,42 @@ func (client AppsClient) GetProcessDumpPreparer(ctx context.Context, resourceGro preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetProcessDumpSender sends the GetProcessDump request. The method will close the +// GetNetworkTracesSlotSender sends the GetNetworkTracesSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetProcessDumpSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetNetworkTracesSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetProcessDumpResponder handles the response to the GetProcessDump request. The method always +// GetNetworkTracesSlotResponder handles the response to the GetNetworkTracesSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetProcessDumpResponder(resp *http.Response) (result ReadCloser, err error) { - result.Value = &resp.Body +func (client AppsClient) GetNetworkTracesSlotResponder(resp *http.Response) (result ListNetworkTrace, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound)) + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetProcessDumpSlot description for Get a memory dump of a process by its ID for a specific scaled-out instance in a -// web site. +// GetNetworkTracesSlotV2 description for Gets a named operation for a network trace capturing (or deployment slot, if +// specified). // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// processID - pID. -// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the +// name - name of the app. +// operationID - GUID of the operation. +// slot - name of the deployment slot. If a slot is not specified, the API will get an operation for the // production slot. -func (client AppsClient) GetProcessDumpSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result ReadCloser, err error) { +func (client AppsClient) GetNetworkTracesSlotV2(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (result ListNetworkTrace, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcessDumpSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTracesSlotV2") defer func() { sc := -1 if result.Response.Response != nil { @@ -13079,35 +13103,35 @@ func (client AppsClient) GetProcessDumpSlot(ctx context.Context, resourceGroupNa 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", "GetProcessDumpSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetNetworkTracesSlotV2", err.Error()) } - req, err := client.GetProcessDumpSlotPreparer(ctx, resourceGroupName, name, processID, slot) + req, err := client.GetNetworkTracesSlotV2Preparer(ctx, resourceGroupName, name, operationID, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDumpSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesSlotV2", nil, "Failure preparing request") return } - resp, err := client.GetProcessDumpSlotSender(req) + resp, err := client.GetNetworkTracesSlotV2Sender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDumpSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesSlotV2", resp, "Failure sending request") return } - result, err = client.GetProcessDumpSlotResponder(resp) + result, err = client.GetNetworkTracesSlotV2Responder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDumpSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesSlotV2", resp, "Failure responding to request") } return } -// GetProcessDumpSlotPreparer prepares the GetProcessDumpSlot request. -func (client AppsClient) GetProcessDumpSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (*http.Request, error) { +// GetNetworkTracesSlotV2Preparer prepares the GetNetworkTracesSlotV2 request. +func (client AppsClient) GetNetworkTracesSlotV2Preparer(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), - "processId": autorest.Encode("path", processID), + "operationId": autorest.Encode("path", operationID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -13121,39 +13145,40 @@ func (client AppsClient) GetProcessDumpSlotPreparer(ctx context.Context, resourc preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetProcessDumpSlotSender sends the GetProcessDumpSlot request. The method will close the +// GetNetworkTracesSlotV2Sender sends the GetNetworkTracesSlotV2 request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetProcessDumpSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetNetworkTracesSlotV2Sender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetProcessDumpSlotResponder handles the response to the GetProcessDumpSlot request. The method always +// GetNetworkTracesSlotV2Responder handles the response to the GetNetworkTracesSlotV2 request. The method always // closes the http.Response Body. -func (client AppsClient) GetProcessDumpSlotResponder(resp *http.Response) (result ReadCloser, err error) { - result.Value = &resp.Body +func (client AppsClient) GetNetworkTracesSlotV2Responder(resp *http.Response) (result ListNetworkTrace, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound)) + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetProcessModule description for Get process information by its ID for a specific scaled-out instance in a web site. +// GetNetworkTracesV2 description for Gets a named operation for a network trace capturing (or deployment slot, if +// specified). // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// processID - pID. -// baseAddress - module base address. -func (client AppsClient) GetProcessModule(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string) (result ProcessModuleInfo, err error) { +// name - name of the app. +// operationID - GUID of the operation. +func (client AppsClient) GetNetworkTracesV2(ctx context.Context, resourceGroupName string, name string, operationID string) (result ListNetworkTrace, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcessModule") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTracesV2") defer func() { sc := -1 if result.Response.Response != nil { @@ -13167,36 +13192,35 @@ func (client AppsClient) GetProcessModule(ctx context.Context, 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", "GetProcessModule", err.Error()) + return result, validation.NewError("web.AppsClient", "GetNetworkTracesV2", err.Error()) } - req, err := client.GetProcessModulePreparer(ctx, resourceGroupName, name, processID, baseAddress) + req, err := client.GetNetworkTracesV2Preparer(ctx, resourceGroupName, name, operationID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModule", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesV2", nil, "Failure preparing request") return } - resp, err := client.GetProcessModuleSender(req) + resp, err := client.GetNetworkTracesV2Sender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModule", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesV2", resp, "Failure sending request") return } - result, err = client.GetProcessModuleResponder(resp) + result, err = client.GetNetworkTracesV2Responder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModule", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesV2", resp, "Failure responding to request") } return } -// GetProcessModulePreparer prepares the GetProcessModule request. -func (client AppsClient) GetProcessModulePreparer(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string) (*http.Request, error) { +// GetNetworkTracesV2Preparer prepares the GetNetworkTracesV2 request. +func (client AppsClient) GetNetworkTracesV2Preparer(ctx context.Context, resourceGroupName string, name string, operationID string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "baseAddress": autorest.Encode("path", baseAddress), "name": autorest.Encode("path", name), - "processId": autorest.Encode("path", processID), + "operationId": autorest.Encode("path", operationID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -13209,43 +13233,39 @@ func (client AppsClient) GetProcessModulePreparer(ctx context.Context, resourceG preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetProcessModuleSender sends the GetProcessModule request. The method will close the +// GetNetworkTracesV2Sender sends the GetNetworkTracesV2 request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetProcessModuleSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetNetworkTracesV2Sender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetProcessModuleResponder handles the response to the GetProcessModule request. The method always +// GetNetworkTracesV2Responder handles the response to the GetNetworkTracesV2 request. The method always // closes the http.Response Body. -func (client AppsClient) GetProcessModuleResponder(resp *http.Response) (result ProcessModuleInfo, err error) { +func (client AppsClient) GetNetworkTracesV2Responder(resp *http.Response) (result ListNetworkTrace, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), - autorest.ByUnmarshallingJSON(&result), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetProcessModuleSlot description for Get process information by its ID for a specific scaled-out instance in a web -// site. +// GetPremierAddOn description for Gets a named add-on of an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// processID - pID. -// baseAddress - module base address. -// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the -// production slot. -func (client AppsClient) GetProcessModuleSlot(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, slot string) (result ProcessModuleInfo, err error) { +// name - name of the app. +// premierAddOnName - add-on name. +func (client AppsClient) GetPremierAddOn(ctx context.Context, resourceGroupName string, name string, premierAddOnName string) (result PremierAddOn, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcessModuleSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPremierAddOn") defer func() { sc := -1 if result.Response.Response != nil { @@ -13259,38 +13279,36 @@ func (client AppsClient) GetProcessModuleSlot(ctx context.Context, resourceGroup 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", "GetProcessModuleSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetPremierAddOn", err.Error()) } - req, err := client.GetProcessModuleSlotPreparer(ctx, resourceGroupName, name, processID, baseAddress, slot) + req, err := client.GetPremierAddOnPreparer(ctx, resourceGroupName, name, premierAddOnName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModuleSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPremierAddOn", nil, "Failure preparing request") return } - resp, err := client.GetProcessModuleSlotSender(req) + resp, err := client.GetPremierAddOnSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModuleSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPremierAddOn", resp, "Failure sending request") return } - result, err = client.GetProcessModuleSlotResponder(resp) + result, err = client.GetPremierAddOnResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModuleSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPremierAddOn", resp, "Failure responding to request") } return } -// GetProcessModuleSlotPreparer prepares the GetProcessModuleSlot request. -func (client AppsClient) GetProcessModuleSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, slot string) (*http.Request, error) { +// GetPremierAddOnPreparer prepares the GetPremierAddOn request. +func (client AppsClient) GetPremierAddOnPreparer(ctx context.Context, resourceGroupName string, name string, premierAddOnName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "baseAddress": autorest.Encode("path", baseAddress), "name": autorest.Encode("path", name), - "processId": autorest.Encode("path", processID), + "premierAddOnName": autorest.Encode("path", premierAddOnName), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -13302,41 +13320,41 @@ func (client AppsClient) GetProcessModuleSlotPreparer(ctx context.Context, resou preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetProcessModuleSlotSender sends the GetProcessModuleSlot request. The method will close the +// GetPremierAddOnSender sends the GetPremierAddOn request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetProcessModuleSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetPremierAddOnSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetProcessModuleSlotResponder handles the response to the GetProcessModuleSlot request. The method always +// GetPremierAddOnResponder handles the response to the GetPremierAddOn request. The method always // closes the http.Response Body. -func (client AppsClient) GetProcessModuleSlotResponder(resp *http.Response) (result ProcessModuleInfo, err error) { +func (client AppsClient) GetPremierAddOnResponder(resp *http.Response) (result PremierAddOn, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetProcessSlot description for Get process information by its ID for a specific scaled-out instance in a web site. +// GetPremierAddOnSlot description for Gets a named add-on of an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// processID - pID. -// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the +// name - name of the app. +// premierAddOnName - add-on name. +// slot - name of the deployment slot. If a slot is not specified, the API will get the named add-on for the // production slot. -func (client AppsClient) GetProcessSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result ProcessInfo, err error) { +func (client AppsClient) GetPremierAddOnSlot(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string) (result PremierAddOn, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcessSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPremierAddOnSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -13350,35 +13368,35 @@ func (client AppsClient) GetProcessSlot(ctx context.Context, resourceGroupName s 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", "GetProcessSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetPremierAddOnSlot", err.Error()) } - req, err := client.GetProcessSlotPreparer(ctx, resourceGroupName, name, processID, slot) + req, err := client.GetPremierAddOnSlotPreparer(ctx, resourceGroupName, name, premierAddOnName, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPremierAddOnSlot", nil, "Failure preparing request") return } - resp, err := client.GetProcessSlotSender(req) + resp, err := client.GetPremierAddOnSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPremierAddOnSlot", resp, "Failure sending request") return } - result, err = client.GetProcessSlotResponder(resp) + result, err = client.GetPremierAddOnSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPremierAddOnSlot", resp, "Failure responding to request") } return } -// GetProcessSlotPreparer prepares the GetProcessSlot request. -func (client AppsClient) GetProcessSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (*http.Request, error) { +// GetPremierAddOnSlotPreparer prepares the GetPremierAddOnSlot request. +func (client AppsClient) GetPremierAddOnSlotPreparer(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), - "processId": autorest.Encode("path", processID), + "premierAddOnName": autorest.Encode("path", premierAddOnName), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -13392,39 +13410,39 @@ func (client AppsClient) GetProcessSlotPreparer(ctx context.Context, resourceGro preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetProcessSlotSender sends the GetProcessSlot request. The method will close the +// GetPremierAddOnSlotSender sends the GetPremierAddOnSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetProcessSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetPremierAddOnSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetProcessSlotResponder handles the response to the GetProcessSlot request. The method always +// GetPremierAddOnSlotResponder handles the response to the GetPremierAddOnSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetProcessSlotResponder(resp *http.Response) (result ProcessInfo, err error) { +func (client AppsClient) GetPremierAddOnSlotResponder(resp *http.Response) (result PremierAddOn, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetPublicCertificate description for Get the named public certificate for an app (or deployment slot, if specified). +// GetPrivateAccess description for Gets data around private site access enablement and authorized Virtual Networks +// that can access the site. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// publicCertificateName - public certificate name. -func (client AppsClient) GetPublicCertificate(ctx context.Context, resourceGroupName string, name string, publicCertificateName string) (result PublicCertificate, err error) { +// name - the name of the web app. +func (client AppsClient) GetPrivateAccess(ctx context.Context, resourceGroupName string, name string) (result PrivateAccess, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPublicCertificate") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPrivateAccess") defer func() { sc := -1 if result.Response.Response != nil { @@ -13438,37 +13456,36 @@ func (client AppsClient) GetPublicCertificate(ctx context.Context, resourceGroup 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", "GetPublicCertificate", err.Error()) + return result, validation.NewError("web.AppsClient", "GetPrivateAccess", err.Error()) } - req, err := client.GetPublicCertificatePreparer(ctx, resourceGroupName, name, publicCertificateName) + req, err := client.GetPrivateAccessPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificate", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateAccess", nil, "Failure preparing request") return } - resp, err := client.GetPublicCertificateSender(req) + resp, err := client.GetPrivateAccessSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificate", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateAccess", resp, "Failure sending request") return } - result, err = client.GetPublicCertificateResponder(resp) + result, err = client.GetPrivateAccessResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificate", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateAccess", resp, "Failure responding to request") } return } -// GetPublicCertificatePreparer prepares the GetPublicCertificate request. -func (client AppsClient) GetPublicCertificatePreparer(ctx context.Context, resourceGroupName string, name string, publicCertificateName string) (*http.Request, error) { +// GetPrivateAccessPreparer prepares the GetPrivateAccess request. +func (client AppsClient) GetPrivateAccessPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "name": autorest.Encode("path", name), - "publicCertificateName": autorest.Encode("path", publicCertificateName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2019-08-01" @@ -13479,21 +13496,21 @@ func (client AppsClient) GetPublicCertificatePreparer(ctx context.Context, resou preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetPublicCertificateSender sends the GetPublicCertificate request. The method will close the +// GetPrivateAccessSender sends the GetPrivateAccess request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetPublicCertificateSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetPrivateAccessSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetPublicCertificateResponder handles the response to the GetPublicCertificate request. The method always +// GetPrivateAccessResponder handles the response to the GetPrivateAccess request. The method always // closes the http.Response Body. -func (client AppsClient) GetPublicCertificateResponder(resp *http.Response) (result PublicCertificate, err error) { +func (client AppsClient) GetPrivateAccessResponder(resp *http.Response) (result PrivateAccess, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -13504,17 +13521,15 @@ func (client AppsClient) GetPublicCertificateResponder(resp *http.Response) (res return } -// GetPublicCertificateSlot description for Get the named public certificate for an app (or deployment slot, if -// specified). -// Parameters: +// GetPrivateAccessSlot description for Gets data around private site access enablement and authorized Virtual Networks +// that can access the site. +// 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 the named binding for the production -// slot. -// publicCertificateName - public certificate name. -func (client AppsClient) GetPublicCertificateSlot(ctx context.Context, resourceGroupName string, name string, slot string, publicCertificateName string) (result PublicCertificate, err error) { +// name - the name of the web app. +// slot - the name of the slot for the web app. +func (client AppsClient) GetPrivateAccessSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result PrivateAccess, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPublicCertificateSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPrivateAccessSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -13528,38 +13543,37 @@ func (client AppsClient) GetPublicCertificateSlot(ctx context.Context, resourceG 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", "GetPublicCertificateSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetPrivateAccessSlot", err.Error()) } - req, err := client.GetPublicCertificateSlotPreparer(ctx, resourceGroupName, name, slot, publicCertificateName) + req, err := client.GetPrivateAccessSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificateSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateAccessSlot", nil, "Failure preparing request") return } - resp, err := client.GetPublicCertificateSlotSender(req) + resp, err := client.GetPrivateAccessSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificateSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateAccessSlot", resp, "Failure sending request") return } - result, err = client.GetPublicCertificateSlotResponder(resp) + result, err = client.GetPrivateAccessSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificateSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateAccessSlot", resp, "Failure responding to request") } return } -// GetPublicCertificateSlotPreparer prepares the GetPublicCertificateSlot request. -func (client AppsClient) GetPublicCertificateSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, publicCertificateName string) (*http.Request, error) { +// GetPrivateAccessSlotPreparer prepares the GetPrivateAccessSlot request. +func (client AppsClient) GetPrivateAccessSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "name": autorest.Encode("path", name), - "publicCertificateName": autorest.Encode("path", publicCertificateName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2019-08-01" @@ -13570,21 +13584,21 @@ func (client AppsClient) GetPublicCertificateSlotPreparer(ctx context.Context, r preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetPublicCertificateSlotSender sends the GetPublicCertificateSlot request. The method will close the +// GetPrivateAccessSlotSender sends the GetPrivateAccessSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetPublicCertificateSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetPrivateAccessSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetPublicCertificateSlotResponder handles the response to the GetPublicCertificateSlot request. The method always +// GetPrivateAccessSlotResponder handles the response to the GetPrivateAccessSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetPublicCertificateSlotResponder(resp *http.Response) (result PublicCertificate, err error) { +func (client AppsClient) GetPrivateAccessSlotResponder(resp *http.Response) (result PrivateAccess, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -13595,14 +13609,14 @@ func (client AppsClient) GetPublicCertificateSlotResponder(resp *http.Response) return } -// GetRelayServiceConnection description for Gets a hybrid connection configuration by its name. +// GetProcess description for Get process information by its ID for a specific scaled-out instance in a web site. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// entityName - name of the hybrid connection. -func (client AppsClient) GetRelayServiceConnection(ctx context.Context, resourceGroupName string, name string, entityName string) (result RelayServiceConnectionEntity, err error) { +// name - site name. +// processID - pID. +func (client AppsClient) GetProcess(ctx context.Context, resourceGroupName string, name string, processID string) (result ProcessInfo, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetRelayServiceConnection") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcess") defer func() { sc := -1 if result.Response.Response != nil { @@ -13616,35 +13630,35 @@ func (client AppsClient) GetRelayServiceConnection(ctx context.Context, resource 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", "GetRelayServiceConnection", err.Error()) + return result, validation.NewError("web.AppsClient", "GetProcess", err.Error()) } - req, err := client.GetRelayServiceConnectionPreparer(ctx, resourceGroupName, name, entityName) + req, err := client.GetProcessPreparer(ctx, resourceGroupName, name, processID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetRelayServiceConnection", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcess", nil, "Failure preparing request") return } - resp, err := client.GetRelayServiceConnectionSender(req) + resp, err := client.GetProcessSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetRelayServiceConnection", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcess", resp, "Failure sending request") return } - result, err = client.GetRelayServiceConnectionResponder(resp) + result, err = client.GetProcessResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetRelayServiceConnection", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcess", resp, "Failure responding to request") } return } -// GetRelayServiceConnectionPreparer prepares the GetRelayServiceConnection request. -func (client AppsClient) GetRelayServiceConnectionPreparer(ctx context.Context, resourceGroupName string, name string, entityName string) (*http.Request, error) { +// GetProcessPreparer prepares the GetProcess request. +func (client AppsClient) GetProcessPreparer(ctx context.Context, resourceGroupName string, name string, processID string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "entityName": autorest.Encode("path", entityName), "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -13657,41 +13671,40 @@ func (client AppsClient) GetRelayServiceConnectionPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetRelayServiceConnectionSender sends the GetRelayServiceConnection request. The method will close the +// GetProcessSender sends the GetProcess request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetRelayServiceConnectionSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetProcessSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetRelayServiceConnectionResponder handles the response to the GetRelayServiceConnection request. The method always +// GetProcessResponder handles the response to the GetProcess request. The method always // closes the http.Response Body. -func (client AppsClient) GetRelayServiceConnectionResponder(resp *http.Response) (result RelayServiceConnectionEntity, err error) { +func (client AppsClient) GetProcessResponder(resp *http.Response) (result ProcessInfo, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetRelayServiceConnectionSlot description for Gets a hybrid connection configuration by its name. +// GetProcessDump description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web +// site. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -// entityName - name of the hybrid connection. -// slot - name of the deployment slot. If a slot is not specified, the API will get a hybrid connection for the -// production slot. -func (client AppsClient) GetRelayServiceConnectionSlot(ctx context.Context, resourceGroupName string, name string, entityName string, slot string) (result RelayServiceConnectionEntity, err error) { +// name - site name. +// processID - pID. +func (client AppsClient) GetProcessDump(ctx context.Context, resourceGroupName string, name string, processID string) (result ReadCloser, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetRelayServiceConnectionSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcessDump") defer func() { sc := -1 if result.Response.Response != nil { @@ -13705,37 +13718,36 @@ func (client AppsClient) GetRelayServiceConnectionSlot(ctx context.Context, reso 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", "GetRelayServiceConnectionSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetProcessDump", err.Error()) } - req, err := client.GetRelayServiceConnectionSlotPreparer(ctx, resourceGroupName, name, entityName, slot) + req, err := client.GetProcessDumpPreparer(ctx, resourceGroupName, name, processID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetRelayServiceConnectionSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDump", nil, "Failure preparing request") return } - resp, err := client.GetRelayServiceConnectionSlotSender(req) + resp, err := client.GetProcessDumpSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetRelayServiceConnectionSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDump", resp, "Failure sending request") return } - result, err = client.GetRelayServiceConnectionSlotResponder(resp) + result, err = client.GetProcessDumpResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetRelayServiceConnectionSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDump", resp, "Failure responding to request") } return } -// GetRelayServiceConnectionSlotPreparer prepares the GetRelayServiceConnectionSlot request. -func (client AppsClient) GetRelayServiceConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, entityName string, slot string) (*http.Request, error) { +// GetProcessDumpPreparer prepares the GetProcessDump request. +func (client AppsClient) GetProcessDumpPreparer(ctx context.Context, resourceGroupName string, name string, processID string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "entityName": autorest.Encode("path", entityName), "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -13747,39 +13759,41 @@ func (client AppsClient) GetRelayServiceConnectionSlotPreparer(ctx context.Conte preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetRelayServiceConnectionSlotSender sends the GetRelayServiceConnectionSlot request. The method will close the +// GetProcessDumpSender sends the GetProcessDump request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetRelayServiceConnectionSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetProcessDumpSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetRelayServiceConnectionSlotResponder handles the response to the GetRelayServiceConnectionSlot request. The method always +// GetProcessDumpResponder handles the response to the GetProcessDump request. The method always // closes the http.Response Body. -func (client AppsClient) GetRelayServiceConnectionSlotResponder(resp *http.Response) (result RelayServiceConnectionEntity, err error) { +func (client AppsClient) GetProcessDumpResponder(resp *http.Response) (result ReadCloser, err error) { + result.Value = &resp.Body err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound)) result.Response = autorest.Response{Response: resp} return } -// GetSiteExtension description for Get site extension information by its ID for a web site, or a deployment slot. +// GetProcessDumpSlot description for Get a memory dump of a process by its ID for a specific scaled-out instance in a +// web site. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - site name. -// siteExtensionID - site extension name. -func (client AppsClient) GetSiteExtension(ctx context.Context, resourceGroupName string, name string, siteExtensionID string) (result SiteExtensionInfo, err error) { +// processID - pID. +// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the +// production slot. +func (client AppsClient) GetProcessDumpSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result ReadCloser, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSiteExtension") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcessDumpSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -13793,36 +13807,37 @@ func (client AppsClient) GetSiteExtension(ctx context.Context, 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", "GetSiteExtension", err.Error()) + return result, validation.NewError("web.AppsClient", "GetProcessDumpSlot", err.Error()) } - req, err := client.GetSiteExtensionPreparer(ctx, resourceGroupName, name, siteExtensionID) + req, err := client.GetProcessDumpSlotPreparer(ctx, resourceGroupName, name, processID, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtension", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDumpSlot", nil, "Failure preparing request") return } - resp, err := client.GetSiteExtensionSender(req) + resp, err := client.GetProcessDumpSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtension", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDumpSlot", resp, "Failure sending request") return } - result, err = client.GetSiteExtensionResponder(resp) + result, err = client.GetProcessDumpSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtension", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDumpSlot", resp, "Failure responding to request") } return } -// GetSiteExtensionPreparer prepares the GetSiteExtension request. -func (client AppsClient) GetSiteExtensionPreparer(ctx context.Context, resourceGroupName string, name string, siteExtensionID string) (*http.Request, error) { +// GetProcessDumpSlotPreparer prepares the GetProcessDumpSlot request. +func (client AppsClient) GetProcessDumpSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "siteExtensionId": autorest.Encode("path", siteExtensionID), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -13834,40 +13849,39 @@ func (client AppsClient) GetSiteExtensionPreparer(ctx context.Context, resourceG preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetSiteExtensionSender sends the GetSiteExtension request. The method will close the +// GetProcessDumpSlotSender sends the GetProcessDumpSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetSiteExtensionSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetProcessDumpSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetSiteExtensionResponder handles the response to the GetSiteExtension request. The method always +// GetProcessDumpSlotResponder handles the response to the GetProcessDumpSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetSiteExtensionResponder(resp *http.Response) (result SiteExtensionInfo, err error) { +func (client AppsClient) GetProcessDumpSlotResponder(resp *http.Response) (result ReadCloser, err error) { + result.Value = &resp.Body err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound)) result.Response = autorest.Response{Response: resp} return } -// GetSiteExtensionSlot description for Get site extension information by its ID for a web site, or a deployment slot. +// GetProcessModule description for Get process information by its ID for a specific scaled-out instance in a web site. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - site name. -// siteExtensionID - site extension name. -// slot - name of the deployment slot. If a slot is not specified, the API uses the production slot. -func (client AppsClient) GetSiteExtensionSlot(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string) (result SiteExtensionInfo, err error) { +// processID - pID. +// baseAddress - module base address. +func (client AppsClient) GetProcessModule(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string) (result ProcessModuleInfo, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSiteExtensionSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcessModule") defer func() { sc := -1 if result.Response.Response != nil { @@ -13881,37 +13895,37 @@ func (client AppsClient) GetSiteExtensionSlot(ctx context.Context, resourceGroup 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", "GetSiteExtensionSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetProcessModule", err.Error()) } - req, err := client.GetSiteExtensionSlotPreparer(ctx, resourceGroupName, name, siteExtensionID, slot) + req, err := client.GetProcessModulePreparer(ctx, resourceGroupName, name, processID, baseAddress) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtensionSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModule", nil, "Failure preparing request") return } - resp, err := client.GetSiteExtensionSlotSender(req) + resp, err := client.GetProcessModuleSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtensionSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModule", resp, "Failure sending request") return } - result, err = client.GetSiteExtensionSlotResponder(resp) + result, err = client.GetProcessModuleResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtensionSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModule", resp, "Failure responding to request") } return } -// GetSiteExtensionSlotPreparer prepares the GetSiteExtensionSlot request. -func (client AppsClient) GetSiteExtensionSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string) (*http.Request, error) { +// GetProcessModulePreparer prepares the GetProcessModule request. +func (client AppsClient) GetProcessModulePreparer(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "baseAddress": autorest.Encode("path", baseAddress), "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "siteExtensionId": autorest.Encode("path", siteExtensionID), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -13923,21 +13937,21 @@ func (client AppsClient) GetSiteExtensionSlotPreparer(ctx context.Context, resou preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetSiteExtensionSlotSender sends the GetSiteExtensionSlot request. The method will close the +// GetProcessModuleSender sends the GetProcessModule request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetSiteExtensionSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetProcessModuleSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetSiteExtensionSlotResponder handles the response to the GetSiteExtensionSlot request. The method always +// GetProcessModuleResponder handles the response to the GetProcessModule request. The method always // closes the http.Response Body. -func (client AppsClient) GetSiteExtensionSlotResponder(resp *http.Response) (result SiteExtensionInfo, err error) { +func (client AppsClient) GetProcessModuleResponder(resp *http.Response) (result ProcessModuleInfo, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -13948,13 +13962,18 @@ func (client AppsClient) GetSiteExtensionSlotResponder(resp *http.Response) (res return } -// GetSitePhpErrorLogFlag description for Gets web app's event logs. +// GetProcessModuleSlot description for Get process information by its ID for a specific scaled-out instance in a web +// site. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of web app. -func (client AppsClient) GetSitePhpErrorLogFlag(ctx context.Context, resourceGroupName string, name string) (result SitePhpErrorLogFlag, err error) { +// name - site name. +// processID - pID. +// baseAddress - module base address. +// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the +// production slot. +func (client AppsClient) GetProcessModuleSlot(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, slot string) (result ProcessModuleInfo, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSitePhpErrorLogFlag") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcessModuleSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -13968,35 +13987,38 @@ func (client AppsClient) GetSitePhpErrorLogFlag(ctx context.Context, resourceGro 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", "GetSitePhpErrorLogFlag", err.Error()) + return result, validation.NewError("web.AppsClient", "GetProcessModuleSlot", err.Error()) } - req, err := client.GetSitePhpErrorLogFlagPreparer(ctx, resourceGroupName, name) + req, err := client.GetProcessModuleSlotPreparer(ctx, resourceGroupName, name, processID, baseAddress, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSitePhpErrorLogFlag", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModuleSlot", nil, "Failure preparing request") return } - resp, err := client.GetSitePhpErrorLogFlagSender(req) + resp, err := client.GetProcessModuleSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSitePhpErrorLogFlag", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModuleSlot", resp, "Failure sending request") return } - result, err = client.GetSitePhpErrorLogFlagResponder(resp) + result, err = client.GetProcessModuleSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSitePhpErrorLogFlag", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModuleSlot", resp, "Failure responding to request") } return } -// GetSitePhpErrorLogFlagPreparer prepares the GetSitePhpErrorLogFlag request. -func (client AppsClient) GetSitePhpErrorLogFlagPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// GetProcessModuleSlotPreparer prepares the GetProcessModuleSlot request. +func (client AppsClient) GetProcessModuleSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "baseAddress": autorest.Encode("path", baseAddress), "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -14008,39 +14030,41 @@ func (client AppsClient) GetSitePhpErrorLogFlagPreparer(ctx context.Context, res preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetSitePhpErrorLogFlagSender sends the GetSitePhpErrorLogFlag request. The method will close the +// GetProcessModuleSlotSender sends the GetProcessModuleSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetSitePhpErrorLogFlagSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetProcessModuleSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetSitePhpErrorLogFlagResponder handles the response to the GetSitePhpErrorLogFlag request. The method always +// GetProcessModuleSlotResponder handles the response to the GetProcessModuleSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetSitePhpErrorLogFlagResponder(resp *http.Response) (result SitePhpErrorLogFlag, err error) { +func (client AppsClient) GetProcessModuleSlotResponder(resp *http.Response) (result ProcessModuleInfo, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetSitePhpErrorLogFlagSlot description for Gets web app's event logs. +// GetProcessSlot description for Get process information by its ID for a specific scaled-out instance in a web site. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of web app. -// slot - name of web app slot. If not specified then will default to production slot. -func (client AppsClient) GetSitePhpErrorLogFlagSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SitePhpErrorLogFlag, err error) { +// name - site name. +// processID - pID. +// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the +// production slot. +func (client AppsClient) GetProcessSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result ProcessInfo, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSitePhpErrorLogFlagSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcessSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -14054,34 +14078,35 @@ func (client AppsClient) GetSitePhpErrorLogFlagSlot(ctx context.Context, resourc 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", "GetSitePhpErrorLogFlagSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetProcessSlot", err.Error()) } - req, err := client.GetSitePhpErrorLogFlagSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.GetProcessSlotPreparer(ctx, resourceGroupName, name, processID, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSitePhpErrorLogFlagSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessSlot", nil, "Failure preparing request") return } - resp, err := client.GetSitePhpErrorLogFlagSlotSender(req) + resp, err := client.GetProcessSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSitePhpErrorLogFlagSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessSlot", resp, "Failure sending request") return } - result, err = client.GetSitePhpErrorLogFlagSlotResponder(resp) + result, err = client.GetProcessSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSitePhpErrorLogFlagSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessSlot", resp, "Failure responding to request") } return } -// GetSitePhpErrorLogFlagSlotPreparer prepares the GetSitePhpErrorLogFlagSlot request. -func (client AppsClient) GetSitePhpErrorLogFlagSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// GetProcessSlotPreparer prepares the GetProcessSlot request. +func (client AppsClient) GetProcessSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -14095,39 +14120,39 @@ func (client AppsClient) GetSitePhpErrorLogFlagSlotPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetSitePhpErrorLogFlagSlotSender sends the GetSitePhpErrorLogFlagSlot request. The method will close the +// GetProcessSlotSender sends the GetProcessSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetSitePhpErrorLogFlagSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetProcessSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetSitePhpErrorLogFlagSlotResponder handles the response to the GetSitePhpErrorLogFlagSlot request. The method always +// GetProcessSlotResponder handles the response to the GetProcessSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetSitePhpErrorLogFlagSlotResponder(resp *http.Response) (result SitePhpErrorLogFlag, err error) { +func (client AppsClient) GetProcessSlotResponder(resp *http.Response) (result ProcessInfo, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetSlot description for Gets the details of a web, mobile, or API app. +// GetPublicCertificate description for Get the named public certificate for an app (or deployment slot, if specified). // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// slot - name of the deployment slot. By default, this API returns the production slot. -func (client AppsClient) GetSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result Site, err error) { +// publicCertificateName - public certificate name. +func (client AppsClient) GetPublicCertificate(ctx context.Context, resourceGroupName string, name string, publicCertificateName string) (result PublicCertificate, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPublicCertificate") defer func() { sc := -1 if result.Response.Response != nil { @@ -14141,37 +14166,37 @@ func (client AppsClient) GetSlot(ctx context.Context, resourceGroupName string, 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", "GetSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetPublicCertificate", err.Error()) } - req, err := client.GetSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.GetPublicCertificatePreparer(ctx, resourceGroupName, name, publicCertificateName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificate", nil, "Failure preparing request") return } - resp, err := client.GetSlotSender(req) + resp, err := client.GetPublicCertificateSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificate", resp, "Failure sending request") return } - result, err = client.GetSlotResponder(resp) + result, err = client.GetPublicCertificateResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificate", resp, "Failure responding to request") } return } -// GetSlotPreparer prepares the GetSlot request. -func (client AppsClient) GetSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// GetPublicCertificatePreparer prepares the GetPublicCertificate request. +func (client AppsClient) GetPublicCertificatePreparer(ctx context.Context, resourceGroupName string, name string, publicCertificateName 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), + "name": autorest.Encode("path", name), + "publicCertificateName": autorest.Encode("path", publicCertificateName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2019-08-01" @@ -14182,38 +14207,42 @@ func (client AppsClient) GetSlotPreparer(ctx context.Context, resourceGroupName preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetSlotSender sends the GetSlot request. The method will close the +// GetPublicCertificateSender sends the GetPublicCertificate request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetPublicCertificateSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetSlotResponder handles the response to the GetSlot request. The method always +// GetPublicCertificateResponder handles the response to the GetPublicCertificate request. The method always // closes the http.Response Body. -func (client AppsClient) GetSlotResponder(resp *http.Response) (result Site, err error) { +func (client AppsClient) GetPublicCertificateResponder(resp *http.Response) (result PublicCertificate, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetSourceControl description for Gets the source control configuration of an app. +// GetPublicCertificateSlot description for Get the named public certificate for an app (or deployment slot, if +// specified). // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -func (client AppsClient) GetSourceControl(ctx context.Context, resourceGroupName string, name string) (result SiteSourceControl, err error) { +// slot - name of the deployment slot. If a slot is not specified, the API the named binding for the production +// slot. +// publicCertificateName - public certificate name. +func (client AppsClient) GetPublicCertificateSlot(ctx context.Context, resourceGroupName string, name string, slot string, publicCertificateName string) (result PublicCertificate, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSourceControl") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPublicCertificateSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -14227,36 +14256,38 @@ func (client AppsClient) GetSourceControl(ctx context.Context, 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", "GetSourceControl", err.Error()) + return result, validation.NewError("web.AppsClient", "GetPublicCertificateSlot", err.Error()) } - req, err := client.GetSourceControlPreparer(ctx, resourceGroupName, name) + req, err := client.GetPublicCertificateSlotPreparer(ctx, resourceGroupName, name, slot, publicCertificateName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSourceControl", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificateSlot", nil, "Failure preparing request") return } - resp, err := client.GetSourceControlSender(req) + resp, err := client.GetPublicCertificateSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSourceControl", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificateSlot", resp, "Failure sending request") return } - result, err = client.GetSourceControlResponder(resp) + result, err = client.GetPublicCertificateSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSourceControl", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificateSlot", resp, "Failure responding to request") } return } -// GetSourceControlPreparer prepares the GetSourceControl request. -func (client AppsClient) GetSourceControlPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// GetPublicCertificateSlotPreparer prepares the GetPublicCertificateSlot request. +func (client AppsClient) GetPublicCertificateSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, publicCertificateName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "name": autorest.Encode("path", name), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "name": autorest.Encode("path", name), + "publicCertificateName": autorest.Encode("path", publicCertificateName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2019-08-01" @@ -14267,40 +14298,39 @@ func (client AppsClient) GetSourceControlPreparer(ctx context.Context, resourceG preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetSourceControlSender sends the GetSourceControl request. The method will close the +// GetPublicCertificateSlotSender sends the GetPublicCertificateSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetSourceControlSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetPublicCertificateSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetSourceControlResponder handles the response to the GetSourceControl request. The method always +// GetPublicCertificateSlotResponder handles the response to the GetPublicCertificateSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetSourceControlResponder(resp *http.Response) (result SiteSourceControl, err error) { +func (client AppsClient) GetPublicCertificateSlotResponder(resp *http.Response) (result PublicCertificate, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetSourceControlSlot description for Gets the source control configuration of an app. +// GetRelayServiceConnection description for Gets a hybrid connection configuration by its name. // 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 get the source control -// configuration for the production slot. -func (client AppsClient) GetSourceControlSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteSourceControl, err error) { +// entityName - name of the hybrid connection. +func (client AppsClient) GetRelayServiceConnection(ctx context.Context, resourceGroupName string, name string, entityName string) (result RelayServiceConnectionEntity, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSourceControlSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetRelayServiceConnection") defer func() { sc := -1 if result.Response.Response != nil { @@ -14314,36 +14344,36 @@ func (client AppsClient) GetSourceControlSlot(ctx context.Context, resourceGroup 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", "GetSourceControlSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetRelayServiceConnection", err.Error()) } - req, err := client.GetSourceControlSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.GetRelayServiceConnectionPreparer(ctx, resourceGroupName, name, entityName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSourceControlSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetRelayServiceConnection", nil, "Failure preparing request") return } - resp, err := client.GetSourceControlSlotSender(req) + resp, err := client.GetRelayServiceConnectionSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSourceControlSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetRelayServiceConnection", resp, "Failure sending request") return } - result, err = client.GetSourceControlSlotResponder(resp) + result, err = client.GetRelayServiceConnectionResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSourceControlSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetRelayServiceConnection", resp, "Failure responding to request") } return } -// GetSourceControlSlotPreparer prepares the GetSourceControlSlot request. -func (client AppsClient) GetSourceControlSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// GetRelayServiceConnectionPreparer prepares the GetRelayServiceConnection request. +func (client AppsClient) GetRelayServiceConnectionPreparer(ctx context.Context, resourceGroupName string, name string, entityName string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "entityName": autorest.Encode("path", entityName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -14355,38 +14385,41 @@ func (client AppsClient) GetSourceControlSlotPreparer(ctx context.Context, resou preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetSourceControlSlotSender sends the GetSourceControlSlot request. The method will close the +// GetRelayServiceConnectionSender sends the GetRelayServiceConnection request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetSourceControlSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetRelayServiceConnectionSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetSourceControlSlotResponder handles the response to the GetSourceControlSlot request. The method always +// GetRelayServiceConnectionResponder handles the response to the GetRelayServiceConnection request. The method always // closes the http.Response Body. -func (client AppsClient) GetSourceControlSlotResponder(resp *http.Response) (result SiteSourceControl, err error) { +func (client AppsClient) GetRelayServiceConnectionResponder(resp *http.Response) (result RelayServiceConnectionEntity, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetSwiftVirtualNetworkConnection description for Gets a Swift Virtual Network connection. +// GetRelayServiceConnectionSlot description for Gets a hybrid connection configuration by its name. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -func (client AppsClient) GetSwiftVirtualNetworkConnection(ctx context.Context, resourceGroupName string, name string) (result SwiftVirtualNetwork, err error) { +// entityName - name of the hybrid connection. +// slot - name of the deployment slot. If a slot is not specified, the API will get a hybrid connection for the +// production slot. +func (client AppsClient) GetRelayServiceConnectionSlot(ctx context.Context, resourceGroupName string, name string, entityName string, slot string) (result RelayServiceConnectionEntity, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSwiftVirtualNetworkConnection") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetRelayServiceConnectionSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -14400,35 +14433,37 @@ func (client AppsClient) GetSwiftVirtualNetworkConnection(ctx context.Context, r 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", "GetSwiftVirtualNetworkConnection", err.Error()) + return result, validation.NewError("web.AppsClient", "GetRelayServiceConnectionSlot", err.Error()) } - req, err := client.GetSwiftVirtualNetworkConnectionPreparer(ctx, resourceGroupName, name) + req, err := client.GetRelayServiceConnectionSlotPreparer(ctx, resourceGroupName, name, entityName, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSwiftVirtualNetworkConnection", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetRelayServiceConnectionSlot", nil, "Failure preparing request") return } - resp, err := client.GetSwiftVirtualNetworkConnectionSender(req) + resp, err := client.GetRelayServiceConnectionSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSwiftVirtualNetworkConnection", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetRelayServiceConnectionSlot", resp, "Failure sending request") return } - result, err = client.GetSwiftVirtualNetworkConnectionResponder(resp) + result, err = client.GetRelayServiceConnectionSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSwiftVirtualNetworkConnection", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetRelayServiceConnectionSlot", resp, "Failure responding to request") } return } -// GetSwiftVirtualNetworkConnectionPreparer prepares the GetSwiftVirtualNetworkConnection request. -func (client AppsClient) GetSwiftVirtualNetworkConnectionPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// GetRelayServiceConnectionSlotPreparer prepares the GetRelayServiceConnectionSlot request. +func (client AppsClient) GetRelayServiceConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, entityName string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "entityName": autorest.Encode("path", entityName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -14440,21 +14475,21 @@ func (client AppsClient) GetSwiftVirtualNetworkConnectionPreparer(ctx context.Co preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetSwiftVirtualNetworkConnectionSender sends the GetSwiftVirtualNetworkConnection request. The method will close the +// GetRelayServiceConnectionSlotSender sends the GetRelayServiceConnectionSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetSwiftVirtualNetworkConnectionSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetRelayServiceConnectionSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetSwiftVirtualNetworkConnectionResponder handles the response to the GetSwiftVirtualNetworkConnection request. The method always +// GetRelayServiceConnectionSlotResponder handles the response to the GetRelayServiceConnectionSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetSwiftVirtualNetworkConnectionResponder(resp *http.Response) (result SwiftVirtualNetwork, err error) { +func (client AppsClient) GetRelayServiceConnectionSlotResponder(resp *http.Response) (result RelayServiceConnectionEntity, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -14465,15 +14500,14 @@ func (client AppsClient) GetSwiftVirtualNetworkConnectionResponder(resp *http.Re return } -// GetSwiftVirtualNetworkConnectionSlot description for Gets a Swift Virtual Network connection. +// GetSiteExtension description for Get site extension information by its ID for a web site, or a deployment slot. // 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 get a gateway for the -// production slot's Virtual Network. -func (client AppsClient) GetSwiftVirtualNetworkConnectionSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SwiftVirtualNetwork, err error) { +// name - site name. +// siteExtensionID - site extension name. +func (client AppsClient) GetSiteExtension(ctx context.Context, resourceGroupName string, name string, siteExtensionID string) (result SiteExtensionInfo, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSwiftVirtualNetworkConnectionSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSiteExtension") defer func() { sc := -1 if result.Response.Response != nil { @@ -14487,36 +14521,36 @@ func (client AppsClient) GetSwiftVirtualNetworkConnectionSlot(ctx context.Contex 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", "GetSwiftVirtualNetworkConnectionSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetSiteExtension", err.Error()) } - req, err := client.GetSwiftVirtualNetworkConnectionSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.GetSiteExtensionPreparer(ctx, resourceGroupName, name, siteExtensionID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSwiftVirtualNetworkConnectionSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtension", nil, "Failure preparing request") return } - resp, err := client.GetSwiftVirtualNetworkConnectionSlotSender(req) + resp, err := client.GetSiteExtensionSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSwiftVirtualNetworkConnectionSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtension", resp, "Failure sending request") return } - result, err = client.GetSwiftVirtualNetworkConnectionSlotResponder(resp) + result, err = client.GetSiteExtensionResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSwiftVirtualNetworkConnectionSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtension", resp, "Failure responding to request") } return } -// GetSwiftVirtualNetworkConnectionSlotPreparer prepares the GetSwiftVirtualNetworkConnectionSlot request. -func (client AppsClient) GetSwiftVirtualNetworkConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// GetSiteExtensionPreparer prepares the GetSiteExtension request. +func (client AppsClient) GetSiteExtensionPreparer(ctx context.Context, resourceGroupName string, name string, siteExtensionID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), + "siteExtensionId": autorest.Encode("path", siteExtensionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -14528,39 +14562,40 @@ func (client AppsClient) GetSwiftVirtualNetworkConnectionSlotPreparer(ctx contex preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetSwiftVirtualNetworkConnectionSlotSender sends the GetSwiftVirtualNetworkConnectionSlot request. The method will close the +// GetSiteExtensionSender sends the GetSiteExtension request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetSwiftVirtualNetworkConnectionSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetSiteExtensionSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetSwiftVirtualNetworkConnectionSlotResponder handles the response to the GetSwiftVirtualNetworkConnectionSlot request. The method always +// GetSiteExtensionResponder handles the response to the GetSiteExtension request. The method always // closes the http.Response Body. -func (client AppsClient) GetSwiftVirtualNetworkConnectionSlotResponder(resp *http.Response) (result SwiftVirtualNetwork, err error) { +func (client AppsClient) GetSiteExtensionResponder(resp *http.Response) (result SiteExtensionInfo, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetTriggeredWebJob description for Gets a triggered web job by its ID for an app, or a deployment slot. +// GetSiteExtensionSlot description for Get site extension information by its ID for a web site, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - site name. -// webJobName - name of Web Job. -func (client AppsClient) GetTriggeredWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string) (result TriggeredWebJob, err error) { +// siteExtensionID - site extension name. +// slot - name of the deployment slot. If a slot is not specified, the API uses the production slot. +func (client AppsClient) GetSiteExtensionSlot(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string) (result SiteExtensionInfo, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetTriggeredWebJob") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSiteExtensionSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -14574,37 +14609,38 @@ func (client AppsClient) GetTriggeredWebJob(ctx context.Context, resourceGroupNa 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", "GetTriggeredWebJob", err.Error()) + return result, validation.NewError("web.AppsClient", "GetSiteExtensionSlot", err.Error()) } - req, err := client.GetTriggeredWebJobPreparer(ctx, resourceGroupName, name, webJobName) + req, err := client.GetSiteExtensionSlotPreparer(ctx, resourceGroupName, name, siteExtensionID, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJob", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtensionSlot", nil, "Failure preparing request") return } - resp, err := client.GetTriggeredWebJobSender(req) + resp, err := client.GetSiteExtensionSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJob", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtensionSlot", resp, "Failure sending request") return } - result, err = client.GetTriggeredWebJobResponder(resp) + result, err = client.GetSiteExtensionSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJob", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtensionSlot", resp, "Failure responding to request") } return } -// GetTriggeredWebJobPreparer prepares the GetTriggeredWebJob request. -func (client AppsClient) GetTriggeredWebJobPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string) (*http.Request, error) { +// GetSiteExtensionSlotPreparer prepares the GetSiteExtensionSlot request. +func (client AppsClient) GetSiteExtensionSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "siteExtensionId": autorest.Encode("path", siteExtensionID), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "webJobName": autorest.Encode("path", webJobName), } const APIVersion = "2019-08-01" @@ -14615,21 +14651,21 @@ func (client AppsClient) GetTriggeredWebJobPreparer(ctx context.Context, resourc preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetTriggeredWebJobSender sends the GetTriggeredWebJob request. The method will close the +// GetSiteExtensionSlotSender sends the GetSiteExtensionSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetTriggeredWebJobSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetSiteExtensionSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetTriggeredWebJobResponder handles the response to the GetTriggeredWebJob request. The method always +// GetSiteExtensionSlotResponder handles the response to the GetSiteExtensionSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetTriggeredWebJobResponder(resp *http.Response) (result TriggeredWebJob, err error) { +func (client AppsClient) GetSiteExtensionSlotResponder(resp *http.Response) (result SiteExtensionInfo, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -14640,16 +14676,13 @@ func (client AppsClient) GetTriggeredWebJobResponder(resp *http.Response) (resul return } -// GetTriggeredWebJobHistory description for Gets a triggered web job's history by its ID for an app, , or a deployment -// slot. +// GetSitePhpErrorLogFlag description for Gets web app's event logs. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// webJobName - name of Web Job. -// ID - history ID. -func (client AppsClient) GetTriggeredWebJobHistory(ctx context.Context, resourceGroupName string, name string, webJobName string, ID string) (result TriggeredJobHistory, err error) { +// name - name of web app. +func (client AppsClient) GetSitePhpErrorLogFlag(ctx context.Context, resourceGroupName string, name string) (result SitePhpErrorLogFlag, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetTriggeredWebJobHistory") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSitePhpErrorLogFlag") defer func() { sc := -1 if result.Response.Response != nil { @@ -14663,38 +14696,36 @@ func (client AppsClient) GetTriggeredWebJobHistory(ctx context.Context, resource 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", "GetTriggeredWebJobHistory", err.Error()) + return result, validation.NewError("web.AppsClient", "GetSitePhpErrorLogFlag", err.Error()) } - req, err := client.GetTriggeredWebJobHistoryPreparer(ctx, resourceGroupName, name, webJobName, ID) + req, err := client.GetSitePhpErrorLogFlagPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobHistory", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSitePhpErrorLogFlag", nil, "Failure preparing request") return } - resp, err := client.GetTriggeredWebJobHistorySender(req) + resp, err := client.GetSitePhpErrorLogFlagSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobHistory", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSitePhpErrorLogFlag", resp, "Failure sending request") return } - result, err = client.GetTriggeredWebJobHistoryResponder(resp) + result, err = client.GetSitePhpErrorLogFlagResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobHistory", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSitePhpErrorLogFlag", resp, "Failure responding to request") } return } -// GetTriggeredWebJobHistoryPreparer prepares the GetTriggeredWebJobHistory request. -func (client AppsClient) GetTriggeredWebJobHistoryPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, ID string) (*http.Request, error) { +// GetSitePhpErrorLogFlagPreparer prepares the GetSitePhpErrorLogFlag request. +func (client AppsClient) GetSitePhpErrorLogFlagPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "id": autorest.Encode("path", ID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "webJobName": autorest.Encode("path", webJobName), } const APIVersion = "2019-08-01" @@ -14705,42 +14736,39 @@ func (client AppsClient) GetTriggeredWebJobHistoryPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetTriggeredWebJobHistorySender sends the GetTriggeredWebJobHistory request. The method will close the +// GetSitePhpErrorLogFlagSender sends the GetSitePhpErrorLogFlag request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetTriggeredWebJobHistorySender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetSitePhpErrorLogFlagSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetTriggeredWebJobHistoryResponder handles the response to the GetTriggeredWebJobHistory request. The method always +// GetSitePhpErrorLogFlagResponder handles the response to the GetSitePhpErrorLogFlag request. The method always // closes the http.Response Body. -func (client AppsClient) GetTriggeredWebJobHistoryResponder(resp *http.Response) (result TriggeredJobHistory, err error) { +func (client AppsClient) GetSitePhpErrorLogFlagResponder(resp *http.Response) (result SitePhpErrorLogFlag, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetTriggeredWebJobHistorySlot description for Gets a triggered web job's history by its ID for an app, , or a -// deployment slot. +// GetSitePhpErrorLogFlagSlot description for Gets web app's event logs. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// webJobName - name of Web Job. -// ID - history ID. -// slot - name of the deployment slot. If a slot is not specified, the API uses the production slot. -func (client AppsClient) GetTriggeredWebJobHistorySlot(ctx context.Context, resourceGroupName string, name string, webJobName string, ID string, slot string) (result TriggeredJobHistory, err error) { +// name - name of web app. +// slot - name of web app slot. If not specified then will default to production slot. +func (client AppsClient) GetSitePhpErrorLogFlagSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SitePhpErrorLogFlag, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetTriggeredWebJobHistorySlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSitePhpErrorLogFlagSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -14754,39 +14782,37 @@ func (client AppsClient) GetTriggeredWebJobHistorySlot(ctx context.Context, reso 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", "GetTriggeredWebJobHistorySlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetSitePhpErrorLogFlagSlot", err.Error()) } - req, err := client.GetTriggeredWebJobHistorySlotPreparer(ctx, resourceGroupName, name, webJobName, ID, slot) + req, err := client.GetSitePhpErrorLogFlagSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobHistorySlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSitePhpErrorLogFlagSlot", nil, "Failure preparing request") return } - resp, err := client.GetTriggeredWebJobHistorySlotSender(req) + resp, err := client.GetSitePhpErrorLogFlagSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobHistorySlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSitePhpErrorLogFlagSlot", resp, "Failure sending request") return } - result, err = client.GetTriggeredWebJobHistorySlotResponder(resp) + result, err = client.GetSitePhpErrorLogFlagSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobHistorySlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSitePhpErrorLogFlagSlot", resp, "Failure responding to request") } return } -// GetTriggeredWebJobHistorySlotPreparer prepares the GetTriggeredWebJobHistorySlot request. -func (client AppsClient) GetTriggeredWebJobHistorySlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, ID string, slot string) (*http.Request, error) { +// GetSitePhpErrorLogFlagSlotPreparer prepares the GetSitePhpErrorLogFlagSlot request. +func (client AppsClient) GetSitePhpErrorLogFlagSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "id": autorest.Encode("path", ID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "webJobName": autorest.Encode("path", webJobName), } const APIVersion = "2019-08-01" @@ -14797,40 +14823,39 @@ func (client AppsClient) GetTriggeredWebJobHistorySlotPreparer(ctx context.Conte preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetTriggeredWebJobHistorySlotSender sends the GetTriggeredWebJobHistorySlot request. The method will close the +// GetSitePhpErrorLogFlagSlotSender sends the GetSitePhpErrorLogFlagSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetTriggeredWebJobHistorySlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetSitePhpErrorLogFlagSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetTriggeredWebJobHistorySlotResponder handles the response to the GetTriggeredWebJobHistorySlot request. The method always +// GetSitePhpErrorLogFlagSlotResponder handles the response to the GetSitePhpErrorLogFlagSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetTriggeredWebJobHistorySlotResponder(resp *http.Response) (result TriggeredJobHistory, err error) { +func (client AppsClient) GetSitePhpErrorLogFlagSlotResponder(resp *http.Response) (result SitePhpErrorLogFlag, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetTriggeredWebJobSlot description for Gets a triggered web job by its ID for an app, or a deployment slot. +// GetSlot description for Gets the details of a web, mobile, or API app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// webJobName - name of Web Job. -// slot - name of the deployment slot. If a slot is not specified, the API uses the production slot. -func (client AppsClient) GetTriggeredWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result TriggeredWebJob, err error) { +// name - name of the app. +// slot - name of the deployment slot. By default, this API returns the production slot. +func (client AppsClient) GetSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result Site, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetTriggeredWebJobSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -14844,38 +14869,37 @@ func (client AppsClient) GetTriggeredWebJobSlot(ctx context.Context, resourceGro 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", "GetTriggeredWebJobSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetSlot", err.Error()) } - req, err := client.GetTriggeredWebJobSlotPreparer(ctx, resourceGroupName, name, webJobName, slot) + req, err := client.GetSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSlot", nil, "Failure preparing request") return } - resp, err := client.GetTriggeredWebJobSlotSender(req) + resp, err := client.GetSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSlot", resp, "Failure sending request") return } - result, err = client.GetTriggeredWebJobSlotResponder(resp) + result, err = client.GetSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSlot", resp, "Failure responding to request") } return } -// GetTriggeredWebJobSlotPreparer prepares the GetTriggeredWebJobSlot request. -func (client AppsClient) GetTriggeredWebJobSlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (*http.Request, error) { +// GetSlotPreparer prepares the GetSlot request. +func (client AppsClient) GetSlotPreparer(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), - "webJobName": autorest.Encode("path", webJobName), } const APIVersion = "2019-08-01" @@ -14886,21 +14910,21 @@ func (client AppsClient) GetTriggeredWebJobSlotPreparer(ctx context.Context, res preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetTriggeredWebJobSlotSender sends the GetTriggeredWebJobSlot request. The method will close the +// GetSlotSender sends the GetSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetTriggeredWebJobSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetTriggeredWebJobSlotResponder handles the response to the GetTriggeredWebJobSlot request. The method always +// GetSlotResponder handles the response to the GetSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetTriggeredWebJobSlotResponder(resp *http.Response) (result TriggeredWebJob, err error) { +func (client AppsClient) GetSlotResponder(resp *http.Response) (result Site, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -14911,14 +14935,13 @@ func (client AppsClient) GetTriggeredWebJobSlotResponder(resp *http.Response) (r return } -// GetVnetConnection description for Gets a virtual network the app (or deployment slot) is connected to by name. +// GetSourceControl description for Gets the source control configuration of an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// vnetName - name of the virtual network. -func (client AppsClient) GetVnetConnection(ctx context.Context, resourceGroupName string, name string, vnetName string) (result VnetInfo, err error) { +func (client AppsClient) GetSourceControl(ctx context.Context, resourceGroupName string, name string) (result SiteSourceControl, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetVnetConnection") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSourceControl") defer func() { sc := -1 if result.Response.Response != nil { @@ -14932,37 +14955,36 @@ func (client AppsClient) GetVnetConnection(ctx context.Context, resourceGroupNam 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", "GetVnetConnection", err.Error()) + return result, validation.NewError("web.AppsClient", "GetSourceControl", err.Error()) } - req, err := client.GetVnetConnectionPreparer(ctx, resourceGroupName, name, vnetName) + req, err := client.GetSourceControlPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnection", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSourceControl", nil, "Failure preparing request") return } - resp, err := client.GetVnetConnectionSender(req) + resp, err := client.GetSourceControlSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnection", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSourceControl", resp, "Failure sending request") return } - result, err = client.GetVnetConnectionResponder(resp) + result, err = client.GetSourceControlResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnection", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSourceControl", resp, "Failure responding to request") } return } -// GetVnetConnectionPreparer prepares the GetVnetConnection request. -func (client AppsClient) GetVnetConnectionPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string) (*http.Request, error) { +// GetSourceControlPreparer prepares the GetSourceControl request. +func (client AppsClient) GetSourceControlPreparer(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), - "vnetName": autorest.Encode("path", vnetName), } const APIVersion = "2019-08-01" @@ -14973,40 +14995,40 @@ func (client AppsClient) GetVnetConnectionPreparer(ctx context.Context, resource preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetVnetConnectionSender sends the GetVnetConnection request. The method will close the +// GetSourceControlSender sends the GetSourceControl request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetVnetConnectionSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetSourceControlSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetVnetConnectionResponder handles the response to the GetVnetConnection request. The method always +// GetSourceControlResponder handles the response to the GetSourceControl request. The method always // closes the http.Response Body. -func (client AppsClient) GetVnetConnectionResponder(resp *http.Response) (result VnetInfo, err error) { +func (client AppsClient) GetSourceControlResponder(resp *http.Response) (result SiteSourceControl, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetVnetConnectionGateway description for Gets an app's Virtual Network gateway. +// GetSourceControlSlot description for Gets the source control configuration of an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// vnetName - name of the Virtual Network. -// gatewayName - name of the gateway. Currently, the only supported string is "primary". -func (client AppsClient) GetVnetConnectionGateway(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string) (result VnetGateway, err error) { +// slot - name of the deployment slot. If a slot is not specified, the API will get the source control +// configuration for the production slot. +func (client AppsClient) GetSourceControlSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteSourceControl, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetVnetConnectionGateway") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSourceControlSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -15020,38 +15042,37 @@ func (client AppsClient) GetVnetConnectionGateway(ctx context.Context, resourceG 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", "GetVnetConnectionGateway", err.Error()) + return result, validation.NewError("web.AppsClient", "GetSourceControlSlot", err.Error()) } - req, err := client.GetVnetConnectionGatewayPreparer(ctx, resourceGroupName, name, vnetName, gatewayName) + req, err := client.GetSourceControlSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionGateway", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSourceControlSlot", nil, "Failure preparing request") return } - resp, err := client.GetVnetConnectionGatewaySender(req) + resp, err := client.GetSourceControlSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionGateway", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSourceControlSlot", resp, "Failure sending request") return } - result, err = client.GetVnetConnectionGatewayResponder(resp) + result, err = client.GetSourceControlSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionGateway", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSourceControlSlot", resp, "Failure responding to request") } return } -// GetVnetConnectionGatewayPreparer prepares the GetVnetConnectionGateway request. -func (client AppsClient) GetVnetConnectionGatewayPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string) (*http.Request, error) { +// GetSourceControlSlotPreparer prepares the GetSourceControlSlot request. +func (client AppsClient) GetSourceControlSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "gatewayName": autorest.Encode("path", gatewayName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vnetName": autorest.Encode("path", vnetName), } const APIVersion = "2019-08-01" @@ -15062,42 +15083,38 @@ func (client AppsClient) GetVnetConnectionGatewayPreparer(ctx context.Context, r preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetVnetConnectionGatewaySender sends the GetVnetConnectionGateway request. The method will close the +// GetSourceControlSlotSender sends the GetSourceControlSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetVnetConnectionGatewaySender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetSourceControlSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetVnetConnectionGatewayResponder handles the response to the GetVnetConnectionGateway request. The method always +// GetSourceControlSlotResponder handles the response to the GetSourceControlSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetVnetConnectionGatewayResponder(resp *http.Response) (result VnetGateway, err error) { +func (client AppsClient) GetSourceControlSlotResponder(resp *http.Response) (result SiteSourceControl, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetVnetConnectionGatewaySlot description for Gets an app's Virtual Network gateway. +// GetSwiftVirtualNetworkConnection description for Gets a Swift Virtual Network connection. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// vnetName - name of the Virtual Network. -// gatewayName - name of the gateway. Currently, the only supported string is "primary". -// slot - name of the deployment slot. If a slot is not specified, the API will get a gateway for the -// production slot's Virtual Network. -func (client AppsClient) GetVnetConnectionGatewaySlot(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, slot string) (result VnetGateway, err error) { +func (client AppsClient) GetSwiftVirtualNetworkConnection(ctx context.Context, resourceGroupName string, name string) (result SwiftVirtualNetwork, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetVnetConnectionGatewaySlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSwiftVirtualNetworkConnection") defer func() { sc := -1 if result.Response.Response != nil { @@ -15111,39 +15128,36 @@ func (client AppsClient) GetVnetConnectionGatewaySlot(ctx context.Context, resou 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", "GetVnetConnectionGatewaySlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetSwiftVirtualNetworkConnection", err.Error()) } - req, err := client.GetVnetConnectionGatewaySlotPreparer(ctx, resourceGroupName, name, vnetName, gatewayName, slot) + req, err := client.GetSwiftVirtualNetworkConnectionPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionGatewaySlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSwiftVirtualNetworkConnection", nil, "Failure preparing request") return } - resp, err := client.GetVnetConnectionGatewaySlotSender(req) + resp, err := client.GetSwiftVirtualNetworkConnectionSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionGatewaySlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSwiftVirtualNetworkConnection", resp, "Failure sending request") return } - result, err = client.GetVnetConnectionGatewaySlotResponder(resp) + result, err = client.GetSwiftVirtualNetworkConnectionResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionGatewaySlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSwiftVirtualNetworkConnection", resp, "Failure responding to request") } return } -// GetVnetConnectionGatewaySlotPreparer prepares the GetVnetConnectionGatewaySlot request. -func (client AppsClient) GetVnetConnectionGatewaySlotPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, slot string) (*http.Request, error) { +// GetSwiftVirtualNetworkConnectionPreparer prepares the GetSwiftVirtualNetworkConnection request. +func (client AppsClient) GetSwiftVirtualNetworkConnectionPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "gatewayName": autorest.Encode("path", gatewayName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "vnetName": autorest.Encode("path", vnetName), } const APIVersion = "2019-08-01" @@ -15154,41 +15168,40 @@ func (client AppsClient) GetVnetConnectionGatewaySlotPreparer(ctx context.Contex preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetVnetConnectionGatewaySlotSender sends the GetVnetConnectionGatewaySlot request. The method will close the +// GetSwiftVirtualNetworkConnectionSender sends the GetSwiftVirtualNetworkConnection request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetVnetConnectionGatewaySlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetSwiftVirtualNetworkConnectionSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetVnetConnectionGatewaySlotResponder handles the response to the GetVnetConnectionGatewaySlot request. The method always +// GetSwiftVirtualNetworkConnectionResponder handles the response to the GetSwiftVirtualNetworkConnection request. The method always // closes the http.Response Body. -func (client AppsClient) GetVnetConnectionGatewaySlotResponder(resp *http.Response) (result VnetGateway, err error) { +func (client AppsClient) GetSwiftVirtualNetworkConnectionResponder(resp *http.Response) (result SwiftVirtualNetwork, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetVnetConnectionSlot description for Gets a virtual network the app (or deployment slot) is connected to by name. +// GetSwiftVirtualNetworkConnectionSlot description for Gets a Swift Virtual Network connection. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// vnetName - name of the virtual network. -// slot - name of the deployment slot. If a slot is not specified, the API will get the named virtual network -// for the production slot. -func (client AppsClient) GetVnetConnectionSlot(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string) (result VnetInfo, err error) { +// slot - name of the deployment slot. If a slot is not specified, the API will get a gateway for the +// production slot's Virtual Network. +func (client AppsClient) GetSwiftVirtualNetworkConnectionSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SwiftVirtualNetwork, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetVnetConnectionSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSwiftVirtualNetworkConnectionSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -15202,38 +15215,37 @@ func (client AppsClient) GetVnetConnectionSlot(ctx context.Context, resourceGrou 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", "GetVnetConnectionSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetSwiftVirtualNetworkConnectionSlot", err.Error()) } - req, err := client.GetVnetConnectionSlotPreparer(ctx, resourceGroupName, name, vnetName, slot) + req, err := client.GetSwiftVirtualNetworkConnectionSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSwiftVirtualNetworkConnectionSlot", nil, "Failure preparing request") return } - resp, err := client.GetVnetConnectionSlotSender(req) + resp, err := client.GetSwiftVirtualNetworkConnectionSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSwiftVirtualNetworkConnectionSlot", resp, "Failure sending request") return } - result, err = client.GetVnetConnectionSlotResponder(resp) + result, err = client.GetSwiftVirtualNetworkConnectionSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSwiftVirtualNetworkConnectionSlot", resp, "Failure responding to request") } return } -// GetVnetConnectionSlotPreparer prepares the GetVnetConnectionSlot request. -func (client AppsClient) GetVnetConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string) (*http.Request, error) { +// GetSwiftVirtualNetworkConnectionSlotPreparer prepares the GetSwiftVirtualNetworkConnectionSlot request. +func (client AppsClient) GetSwiftVirtualNetworkConnectionSlotPreparer(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), - "vnetName": autorest.Encode("path", vnetName), } const APIVersion = "2019-08-01" @@ -15244,21 +15256,21 @@ func (client AppsClient) GetVnetConnectionSlotPreparer(ctx context.Context, reso preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetVnetConnectionSlotSender sends the GetVnetConnectionSlot request. The method will close the +// GetSwiftVirtualNetworkConnectionSlotSender sends the GetSwiftVirtualNetworkConnectionSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetVnetConnectionSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetSwiftVirtualNetworkConnectionSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetVnetConnectionSlotResponder handles the response to the GetVnetConnectionSlot request. The method always +// GetSwiftVirtualNetworkConnectionSlotResponder handles the response to the GetSwiftVirtualNetworkConnectionSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetVnetConnectionSlotResponder(resp *http.Response) (result VnetInfo, err error) { +func (client AppsClient) GetSwiftVirtualNetworkConnectionSlotResponder(resp *http.Response) (result SwiftVirtualNetwork, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -15269,14 +15281,14 @@ func (client AppsClient) GetVnetConnectionSlotResponder(resp *http.Response) (re return } -// GetWebJob description for Get webjob information for an app, or a deployment slot. +// GetTriggeredWebJob description for Gets a triggered web job by its ID for an app, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - site name. -// webJobName - name of the web job. -func (client AppsClient) GetWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string) (result Job, err error) { +// webJobName - name of Web Job. +func (client AppsClient) GetTriggeredWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string) (result TriggeredWebJob, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetWebJob") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetTriggeredWebJob") defer func() { sc := -1 if result.Response.Response != nil { @@ -15290,32 +15302,32 @@ func (client AppsClient) GetWebJob(ctx context.Context, resourceGroupName string 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", "GetWebJob", err.Error()) + return result, validation.NewError("web.AppsClient", "GetTriggeredWebJob", err.Error()) } - req, err := client.GetWebJobPreparer(ctx, resourceGroupName, name, webJobName) + req, err := client.GetTriggeredWebJobPreparer(ctx, resourceGroupName, name, webJobName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebJob", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJob", nil, "Failure preparing request") return } - resp, err := client.GetWebJobSender(req) + resp, err := client.GetTriggeredWebJobSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebJob", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJob", resp, "Failure sending request") return } - result, err = client.GetWebJobResponder(resp) + result, err = client.GetTriggeredWebJobResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebJob", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJob", resp, "Failure responding to request") } return } -// GetWebJobPreparer prepares the GetWebJob request. -func (client AppsClient) GetWebJobPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string) (*http.Request, error) { +// GetTriggeredWebJobPreparer prepares the GetTriggeredWebJob request. +func (client AppsClient) GetTriggeredWebJobPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -15331,41 +15343,41 @@ func (client AppsClient) GetWebJobPreparer(ctx context.Context, resourceGroupNam preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetWebJobSender sends the GetWebJob request. The method will close the +// GetTriggeredWebJobSender sends the GetTriggeredWebJob request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetWebJobSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetTriggeredWebJobSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetWebJobResponder handles the response to the GetWebJob request. The method always +// GetTriggeredWebJobResponder handles the response to the GetTriggeredWebJob request. The method always // closes the http.Response Body. -func (client AppsClient) GetWebJobResponder(resp *http.Response) (result Job, err error) { +func (client AppsClient) GetTriggeredWebJobResponder(resp *http.Response) (result TriggeredWebJob, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetWebJobSlot description for Get webjob information for an app, or a deployment slot. +// GetTriggeredWebJobHistory description for Gets a triggered web job's history by its ID for an app, , or a deployment +// slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - site name. -// webJobName - name of the web job. -// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the -// production slot. -func (client AppsClient) GetWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result Job, err error) { +// webJobName - name of Web Job. +// ID - history ID. +func (client AppsClient) GetTriggeredWebJobHistory(ctx context.Context, resourceGroupName string, name string, webJobName string, ID string) (result TriggeredJobHistory, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetWebJobSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetTriggeredWebJobHistory") defer func() { sc := -1 if result.Response.Response != nil { @@ -15379,36 +15391,36 @@ func (client AppsClient) GetWebJobSlot(ctx context.Context, resourceGroupName st 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", "GetWebJobSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetTriggeredWebJobHistory", err.Error()) } - req, err := client.GetWebJobSlotPreparer(ctx, resourceGroupName, name, webJobName, slot) + req, err := client.GetTriggeredWebJobHistoryPreparer(ctx, resourceGroupName, name, webJobName, ID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebJobSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobHistory", nil, "Failure preparing request") return } - resp, err := client.GetWebJobSlotSender(req) + resp, err := client.GetTriggeredWebJobHistorySender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebJobSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobHistory", resp, "Failure sending request") return } - result, err = client.GetWebJobSlotResponder(resp) + result, err = client.GetTriggeredWebJobHistoryResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebJobSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobHistory", resp, "Failure responding to request") } return } -// GetWebJobSlotPreparer prepares the GetWebJobSlot request. -func (client AppsClient) GetWebJobSlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (*http.Request, error) { +// GetTriggeredWebJobHistoryPreparer prepares the GetTriggeredWebJobHistory request. +func (client AppsClient) GetTriggeredWebJobHistoryPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, ID string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "id": autorest.Encode("path", ID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), "webJobName": autorest.Encode("path", webJobName), } @@ -15421,38 +15433,42 @@ func (client AppsClient) GetWebJobSlotPreparer(ctx context.Context, resourceGrou preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetWebJobSlotSender sends the GetWebJobSlot request. The method will close the +// GetTriggeredWebJobHistorySender sends the GetTriggeredWebJobHistory request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetWebJobSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetTriggeredWebJobHistorySender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetWebJobSlotResponder handles the response to the GetWebJobSlot request. The method always +// GetTriggeredWebJobHistoryResponder handles the response to the GetTriggeredWebJobHistory request. The method always // closes the http.Response Body. -func (client AppsClient) GetWebJobSlotResponder(resp *http.Response) (result Job, err error) { +func (client AppsClient) GetTriggeredWebJobHistoryResponder(resp *http.Response) (result TriggeredJobHistory, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetWebSiteContainerLogs description for Gets the last lines of docker logs for the given site +// GetTriggeredWebJobHistorySlot description for Gets a triggered web job's history by its ID for an app, , or a +// deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of web app. -func (client AppsClient) GetWebSiteContainerLogs(ctx context.Context, resourceGroupName string, name string) (result ReadCloser, err error) { +// name - site name. +// webJobName - name of Web Job. +// ID - history ID. +// slot - name of the deployment slot. If a slot is not specified, the API uses the production slot. +func (client AppsClient) GetTriggeredWebJobHistorySlot(ctx context.Context, resourceGroupName string, name string, webJobName string, ID string, slot string) (result TriggeredJobHistory, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetWebSiteContainerLogs") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetTriggeredWebJobHistorySlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -15466,36 +15482,39 @@ func (client AppsClient) GetWebSiteContainerLogs(ctx context.Context, resourceGr 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", "GetWebSiteContainerLogs", err.Error()) + return result, validation.NewError("web.AppsClient", "GetTriggeredWebJobHistorySlot", err.Error()) } - req, err := client.GetWebSiteContainerLogsPreparer(ctx, resourceGroupName, name) + req, err := client.GetTriggeredWebJobHistorySlotPreparer(ctx, resourceGroupName, name, webJobName, ID, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebSiteContainerLogs", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobHistorySlot", nil, "Failure preparing request") return } - resp, err := client.GetWebSiteContainerLogsSender(req) + resp, err := client.GetTriggeredWebJobHistorySlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebSiteContainerLogs", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobHistorySlot", resp, "Failure sending request") return } - result, err = client.GetWebSiteContainerLogsResponder(resp) + result, err = client.GetTriggeredWebJobHistorySlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebSiteContainerLogs", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobHistorySlot", resp, "Failure responding to request") } return } -// GetWebSiteContainerLogsPreparer prepares the GetWebSiteContainerLogs request. -func (client AppsClient) GetWebSiteContainerLogsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// GetTriggeredWebJobHistorySlotPreparer prepares the GetTriggeredWebJobHistorySlot request. +func (client AppsClient) GetTriggeredWebJobHistorySlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, ID string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "id": autorest.Encode("path", ID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "webJobName": autorest.Encode("path", webJobName), } const APIVersion = "2019-08-01" @@ -15504,40 +15523,42 @@ func (client AppsClient) GetWebSiteContainerLogsPreparer(ctx context.Context, re } preparer := autorest.CreatePreparer( - autorest.AsPost(), + autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetWebSiteContainerLogsSender sends the GetWebSiteContainerLogs request. The method will close the +// GetTriggeredWebJobHistorySlotSender sends the GetTriggeredWebJobHistorySlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetWebSiteContainerLogsSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetTriggeredWebJobHistorySlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetWebSiteContainerLogsResponder handles the response to the GetWebSiteContainerLogs request. The method always +// GetTriggeredWebJobHistorySlotResponder handles the response to the GetTriggeredWebJobHistorySlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetWebSiteContainerLogsResponder(resp *http.Response) (result ReadCloser, err error) { - result.Value = &resp.Body +func (client AppsClient) GetTriggeredWebJobHistorySlotResponder(resp *http.Response) (result TriggeredJobHistory, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent)) + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetWebSiteContainerLogsSlot description for Gets the last lines of docker logs for the given site +// GetTriggeredWebJobSlot description for Gets a triggered web job by its ID for an app, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of web app. -// slot - name of web app slot. If not specified then will default to production slot. -func (client AppsClient) GetWebSiteContainerLogsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result ReadCloser, err error) { +// name - site name. +// webJobName - name of Web Job. +// slot - name of the deployment slot. If a slot is not specified, the API uses the production slot. +func (client AppsClient) GetTriggeredWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result TriggeredWebJob, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetWebSiteContainerLogsSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetTriggeredWebJobSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -15551,37 +15572,38 @@ func (client AppsClient) GetWebSiteContainerLogsSlot(ctx context.Context, resour 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", "GetWebSiteContainerLogsSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetTriggeredWebJobSlot", err.Error()) } - req, err := client.GetWebSiteContainerLogsSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.GetTriggeredWebJobSlotPreparer(ctx, resourceGroupName, name, webJobName, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebSiteContainerLogsSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobSlot", nil, "Failure preparing request") return } - resp, err := client.GetWebSiteContainerLogsSlotSender(req) + resp, err := client.GetTriggeredWebJobSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebSiteContainerLogsSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobSlot", resp, "Failure sending request") return } - result, err = client.GetWebSiteContainerLogsSlotResponder(resp) + result, err = client.GetTriggeredWebJobSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebSiteContainerLogsSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobSlot", resp, "Failure responding to request") } return } -// GetWebSiteContainerLogsSlotPreparer prepares the GetWebSiteContainerLogsSlot request. -func (client AppsClient) GetWebSiteContainerLogsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// GetTriggeredWebJobSlotPreparer prepares the GetTriggeredWebJobSlot request. +func (client AppsClient) GetTriggeredWebJobSlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName 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), + "webJobName": autorest.Encode("path", webJobName), } const APIVersion = "2019-08-01" @@ -15590,44 +15612,45 @@ func (client AppsClient) GetWebSiteContainerLogsSlotPreparer(ctx context.Context } preparer := autorest.CreatePreparer( - autorest.AsPost(), + autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetWebSiteContainerLogsSlotSender sends the GetWebSiteContainerLogsSlot request. The method will close the +// GetTriggeredWebJobSlotSender sends the GetTriggeredWebJobSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetWebSiteContainerLogsSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetTriggeredWebJobSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// GetWebSiteContainerLogsSlotResponder handles the response to the GetWebSiteContainerLogsSlot request. The method always +// GetTriggeredWebJobSlotResponder handles the response to the GetTriggeredWebJobSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetWebSiteContainerLogsSlotResponder(resp *http.Response) (result ReadCloser, err error) { - result.Value = &resp.Body +func (client AppsClient) GetTriggeredWebJobSlotResponder(resp *http.Response) (result TriggeredWebJob, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent)) + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// InstallSiteExtension description for Install site extension on a web site, or a deployment slot. +// GetVnetConnection description for Gets a virtual network the app (or deployment slot) is connected to by name. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// siteExtensionID - site extension name. -func (client AppsClient) InstallSiteExtension(ctx context.Context, resourceGroupName string, name string, siteExtensionID string) (result AppsInstallSiteExtensionFuture, err error) { +// name - name of the app. +// vnetName - name of the virtual network. +func (client AppsClient) GetVnetConnection(ctx context.Context, resourceGroupName string, name string, vnetName string) (result VnetInfo, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.InstallSiteExtension") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetVnetConnection") defer func() { sc := -1 - if result.Response() != nil { - sc = result.Response().StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -15637,31 +15660,37 @@ func (client AppsClient) InstallSiteExtension(ctx context.Context, resourceGroup 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", "InstallSiteExtension", err.Error()) + return result, validation.NewError("web.AppsClient", "GetVnetConnection", err.Error()) } - req, err := client.InstallSiteExtensionPreparer(ctx, resourceGroupName, name, siteExtensionID) + req, err := client.GetVnetConnectionPreparer(ctx, resourceGroupName, name, vnetName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "InstallSiteExtension", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnection", nil, "Failure preparing request") return } - result, err = client.InstallSiteExtensionSender(req) + resp, err := client.GetVnetConnectionSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "InstallSiteExtension", result.Response(), "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnection", resp, "Failure sending request") return } + result, err = client.GetVnetConnectionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnection", resp, "Failure responding to request") + } + return } -// InstallSiteExtensionPreparer prepares the InstallSiteExtension request. -func (client AppsClient) InstallSiteExtensionPreparer(ctx context.Context, resourceGroupName string, name string, siteExtensionID string) (*http.Request, error) { +// GetVnetConnectionPreparer prepares the GetVnetConnection request. +func (client AppsClient) GetVnetConnectionPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "siteExtensionId": autorest.Encode("path", siteExtensionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vnetName": autorest.Encode("path", vnetName), } const APIVersion = "2019-08-01" @@ -15670,52 +15699,46 @@ func (client AppsClient) InstallSiteExtensionPreparer(ctx context.Context, resou } preparer := autorest.CreatePreparer( - autorest.AsPut(), + autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// InstallSiteExtensionSender sends the InstallSiteExtension request. The method will close the +// GetVnetConnectionSender sends the GetVnetConnection request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) InstallSiteExtensionSender(req *http.Request) (future AppsInstallSiteExtensionFuture, err error) { +func (client AppsClient) GetVnetConnectionSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) - if err != nil { - return - } - future.Future, err = azure.NewFutureFromResponse(resp) - return + return autorest.SendWithSender(client, req, sd...) } -// InstallSiteExtensionResponder handles the response to the InstallSiteExtension request. The method always +// GetVnetConnectionResponder handles the response to the GetVnetConnection request. The method always // closes the http.Response Body. -func (client AppsClient) InstallSiteExtensionResponder(resp *http.Response) (result SiteExtensionInfo, err error) { +func (client AppsClient) GetVnetConnectionResponder(resp *http.Response) (result VnetInfo, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusTooManyRequests), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// InstallSiteExtensionSlot description for Install site extension on a web site, or a deployment slot. +// GetVnetConnectionGateway description for Gets an app's Virtual Network gateway. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// siteExtensionID - site extension name. -// slot - name of the deployment slot. If a slot is not specified, the API uses the production slot. -func (client AppsClient) InstallSiteExtensionSlot(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string) (result AppsInstallSiteExtensionSlotFuture, err error) { +// name - name of the app. +// vnetName - name of the Virtual Network. +// gatewayName - name of the gateway. Currently, the only supported string is "primary". +func (client AppsClient) GetVnetConnectionGateway(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string) (result VnetGateway, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.InstallSiteExtensionSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetVnetConnectionGateway") defer func() { sc := -1 - if result.Response() != nil { - sc = result.Response().StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -15725,32 +15748,38 @@ func (client AppsClient) InstallSiteExtensionSlot(ctx context.Context, resourceG 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", "InstallSiteExtensionSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetVnetConnectionGateway", err.Error()) } - req, err := client.InstallSiteExtensionSlotPreparer(ctx, resourceGroupName, name, siteExtensionID, slot) + req, err := client.GetVnetConnectionGatewayPreparer(ctx, resourceGroupName, name, vnetName, gatewayName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "InstallSiteExtensionSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionGateway", nil, "Failure preparing request") return } - result, err = client.InstallSiteExtensionSlotSender(req) + resp, err := client.GetVnetConnectionGatewaySender(req) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "InstallSiteExtensionSlot", result.Response(), "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionGateway", resp, "Failure sending request") return } + result, err = client.GetVnetConnectionGatewayResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionGateway", resp, "Failure responding to request") + } + return } -// InstallSiteExtensionSlotPreparer prepares the InstallSiteExtensionSlot request. -func (client AppsClient) InstallSiteExtensionSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string) (*http.Request, error) { +// GetVnetConnectionGatewayPreparer prepares the GetVnetConnectionGateway request. +func (client AppsClient) GetVnetConnectionGatewayPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "gatewayName": autorest.Encode("path", gatewayName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "siteExtensionId": autorest.Encode("path", siteExtensionID), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vnetName": autorest.Encode("path", vnetName), } const APIVersion = "2019-08-01" @@ -15759,46 +15788,44 @@ func (client AppsClient) InstallSiteExtensionSlotPreparer(ctx context.Context, r } preparer := autorest.CreatePreparer( - autorest.AsPut(), + autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// InstallSiteExtensionSlotSender sends the InstallSiteExtensionSlot request. The method will close the +// GetVnetConnectionGatewaySender sends the GetVnetConnectionGateway request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) InstallSiteExtensionSlotSender(req *http.Request) (future AppsInstallSiteExtensionSlotFuture, err error) { +func (client AppsClient) GetVnetConnectionGatewaySender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) - if err != nil { - return - } - future.Future, err = azure.NewFutureFromResponse(resp) - return + return autorest.SendWithSender(client, req, sd...) } -// InstallSiteExtensionSlotResponder handles the response to the InstallSiteExtensionSlot request. The method always +// GetVnetConnectionGatewayResponder handles the response to the GetVnetConnectionGateway request. The method always // closes the http.Response Body. -func (client AppsClient) InstallSiteExtensionSlotResponder(resp *http.Response) (result SiteExtensionInfo, err error) { +func (client AppsClient) GetVnetConnectionGatewayResponder(resp *http.Response) (result VnetGateway, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusTooManyRequests), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// IsCloneable description for Shows whether an app can be cloned to another resource group or subscription. +// GetVnetConnectionGatewaySlot description for Gets an app's Virtual Network gateway. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -func (client AppsClient) IsCloneable(ctx context.Context, resourceGroupName string, name string) (result SiteCloneability, err error) { +// vnetName - name of the Virtual Network. +// gatewayName - name of the gateway. Currently, the only supported string is "primary". +// slot - name of the deployment slot. If a slot is not specified, the API will get a gateway for the +// production slot's Virtual Network. +func (client AppsClient) GetVnetConnectionGatewaySlot(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, slot string) (result VnetGateway, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.IsCloneable") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetVnetConnectionGatewaySlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -15812,36 +15839,39 @@ func (client AppsClient) IsCloneable(ctx context.Context, resourceGroupName stri 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", "IsCloneable", err.Error()) + return result, validation.NewError("web.AppsClient", "GetVnetConnectionGatewaySlot", err.Error()) } - req, err := client.IsCloneablePreparer(ctx, resourceGroupName, name) + req, err := client.GetVnetConnectionGatewaySlotPreparer(ctx, resourceGroupName, name, vnetName, gatewayName, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "IsCloneable", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionGatewaySlot", nil, "Failure preparing request") return } - resp, err := client.IsCloneableSender(req) + resp, err := client.GetVnetConnectionGatewaySlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "IsCloneable", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionGatewaySlot", resp, "Failure sending request") return } - result, err = client.IsCloneableResponder(resp) + result, err = client.GetVnetConnectionGatewaySlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "IsCloneable", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionGatewaySlot", resp, "Failure responding to request") } return } -// IsCloneablePreparer prepares the IsCloneable request. -func (client AppsClient) IsCloneablePreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// GetVnetConnectionGatewaySlotPreparer prepares the GetVnetConnectionGatewaySlot request. +func (client AppsClient) GetVnetConnectionGatewaySlotPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "gatewayName": autorest.Encode("path", gatewayName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vnetName": autorest.Encode("path", vnetName), } const APIVersion = "2019-08-01" @@ -15850,41 +15880,43 @@ func (client AppsClient) IsCloneablePreparer(ctx context.Context, resourceGroupN } preparer := autorest.CreatePreparer( - autorest.AsPost(), + autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// IsCloneableSender sends the IsCloneable request. The method will close the +// GetVnetConnectionGatewaySlotSender sends the GetVnetConnectionGatewaySlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) IsCloneableSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetVnetConnectionGatewaySlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// IsCloneableResponder handles the response to the IsCloneable request. The method always +// GetVnetConnectionGatewaySlotResponder handles the response to the GetVnetConnectionGatewaySlot request. The method always // closes the http.Response Body. -func (client AppsClient) IsCloneableResponder(resp *http.Response) (result SiteCloneability, err error) { +func (client AppsClient) GetVnetConnectionGatewaySlotResponder(resp *http.Response) (result VnetGateway, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// IsCloneableSlot description for Shows whether an app can be cloned to another resource group or subscription. +// GetVnetConnectionSlot description for Gets a virtual network the app (or deployment slot) is connected to by name. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// slot - name of the deployment slot. By default, this API returns information on the production slot. -func (client AppsClient) IsCloneableSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteCloneability, err error) { +// vnetName - name of the virtual network. +// slot - name of the deployment slot. If a slot is not specified, the API will get the named virtual network +// for the production slot. +func (client AppsClient) GetVnetConnectionSlot(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string) (result VnetInfo, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.IsCloneableSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetVnetConnectionSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -15898,37 +15930,38 @@ func (client AppsClient) IsCloneableSlot(ctx context.Context, 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", "IsCloneableSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetVnetConnectionSlot", err.Error()) } - req, err := client.IsCloneableSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.GetVnetConnectionSlotPreparer(ctx, resourceGroupName, name, vnetName, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "IsCloneableSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionSlot", nil, "Failure preparing request") return } - resp, err := client.IsCloneableSlotSender(req) + resp, err := client.GetVnetConnectionSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "IsCloneableSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionSlot", resp, "Failure sending request") return } - result, err = client.IsCloneableSlotResponder(resp) + result, err = client.GetVnetConnectionSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "IsCloneableSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionSlot", resp, "Failure responding to request") } return } -// IsCloneableSlotPreparer prepares the IsCloneableSlot request. -func (client AppsClient) IsCloneableSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// GetVnetConnectionSlotPreparer prepares the GetVnetConnectionSlot request. +func (client AppsClient) GetVnetConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, vnetName 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), + "vnetName": autorest.Encode("path", vnetName), } const APIVersion = "2019-08-01" @@ -15937,23 +15970,23 @@ func (client AppsClient) IsCloneableSlotPreparer(ctx context.Context, resourceGr } preparer := autorest.CreatePreparer( - autorest.AsPost(), + autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// IsCloneableSlotSender sends the IsCloneableSlot request. The method will close the +// GetVnetConnectionSlotSender sends the GetVnetConnectionSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) IsCloneableSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetVnetConnectionSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// IsCloneableSlotResponder handles the response to the IsCloneableSlot request. The method always +// GetVnetConnectionSlotResponder handles the response to the GetVnetConnectionSlot request. The method always // closes the http.Response Body. -func (client AppsClient) IsCloneableSlotResponder(resp *http.Response) (result SiteCloneability, err error) { +func (client AppsClient) GetVnetConnectionSlotResponder(resp *http.Response) (result VnetInfo, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -15964,44 +15997,58 @@ func (client AppsClient) IsCloneableSlotResponder(resp *http.Response) (result S return } -// List description for Get all apps for a subscription. -func (client AppsClient) List(ctx context.Context) (result AppCollectionPage, err error) { +// GetWebJob description for Get webjob information for an app, or a deployment slot. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - site name. +// webJobName - name of the web job. +func (client AppsClient) GetWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string) (result Job, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.List") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetWebJob") defer func() { sc := -1 - if result.ac.Response.Response != nil { - sc = result.ac.Response.Response.StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx) + 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", "GetWebJob", err.Error()) + } + + req, err := client.GetWebJobPreparer(ctx, resourceGroupName, name, webJobName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "List", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebJob", nil, "Failure preparing request") return } - resp, err := client.ListSender(req) + resp, err := client.GetWebJobSender(req) if err != nil { - result.ac.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "List", resp, "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebJob", resp, "Failure sending request") return } - result.ac, err = client.ListResponder(resp) + result, err = client.GetWebJobResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "List", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebJob", resp, "Failure responding to request") } return } -// ListPreparer prepares the List request. -func (client AppsClient) ListPreparer(ctx context.Context) (*http.Request, error) { +// GetWebJobPreparer prepares the GetWebJob request. +func (client AppsClient) GetWebJobPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "webJobName": autorest.Encode("path", webJobName), } const APIVersion = "2019-08-01" @@ -16012,21 +16059,21 @@ func (client AppsClient) ListPreparer(ctx context.Context) (*http.Request, error preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListSender sends the List request. The method will close the +// GetWebJobSender sends the GetWebJob request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetWebJobSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListResponder handles the response to the List request. The method always +// GetWebJobResponder handles the response to the GetWebJob request. The method always // closes the http.Response Body. -func (client AppsClient) ListResponder(resp *http.Response) (result AppCollection, err error) { +func (client AppsClient) GetWebJobResponder(resp *http.Response) (result Job, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -16037,50 +16084,16 @@ func (client AppsClient) ListResponder(resp *http.Response) (result AppCollectio return } -// listNextResults retrieves the next set of results, if any. -func (client AppsClient) listNextResults(ctx context.Context, lastResults AppCollection) (result AppCollection, err error) { - req, err := lastResults.appCollectionPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client AppsClient) ListComplete(ctx context.Context) (result AppCollectionIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.List") - 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.List(ctx) - return -} - -// ListApplicationSettings description for Gets the application settings of an app. +// GetWebJobSlot description for Get webjob information for an app, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -func (client AppsClient) ListApplicationSettings(ctx context.Context, resourceGroupName string, name string) (result StringDictionary, err error) { +// name - site name. +// webJobName - name of the web job. +// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the +// production slot. +func (client AppsClient) GetWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result Job, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListApplicationSettings") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetWebJobSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -16094,36 +16107,38 @@ func (client AppsClient) ListApplicationSettings(ctx context.Context, resourceGr 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", "ListApplicationSettings", err.Error()) + return result, validation.NewError("web.AppsClient", "GetWebJobSlot", err.Error()) } - req, err := client.ListApplicationSettingsPreparer(ctx, resourceGroupName, name) + req, err := client.GetWebJobSlotPreparer(ctx, resourceGroupName, name, webJobName, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListApplicationSettings", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebJobSlot", nil, "Failure preparing request") return } - resp, err := client.ListApplicationSettingsSender(req) + resp, err := client.GetWebJobSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListApplicationSettings", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebJobSlot", resp, "Failure sending request") return } - result, err = client.ListApplicationSettingsResponder(resp) + result, err = client.GetWebJobSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListApplicationSettings", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebJobSlot", resp, "Failure responding to request") } return } -// ListApplicationSettingsPreparer prepares the ListApplicationSettings request. -func (client AppsClient) ListApplicationSettingsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// GetWebJobSlotPreparer prepares the GetWebJobSlot request. +func (client AppsClient) GetWebJobSlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName 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), + "webJobName": autorest.Encode("path", webJobName), } const APIVersion = "2019-08-01" @@ -16132,23 +16147,23 @@ func (client AppsClient) ListApplicationSettingsPreparer(ctx context.Context, re } preparer := autorest.CreatePreparer( - autorest.AsPost(), + autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListApplicationSettingsSender sends the ListApplicationSettings request. The method will close the +// GetWebJobSlotSender sends the GetWebJobSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListApplicationSettingsSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetWebJobSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListApplicationSettingsResponder handles the response to the ListApplicationSettings request. The method always +// GetWebJobSlotResponder handles the response to the GetWebJobSlot request. The method always // closes the http.Response Body. -func (client AppsClient) ListApplicationSettingsResponder(resp *http.Response) (result StringDictionary, err error) { +func (client AppsClient) GetWebJobSlotResponder(resp *http.Response) (result Job, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -16159,15 +16174,13 @@ func (client AppsClient) ListApplicationSettingsResponder(resp *http.Response) ( return } -// ListApplicationSettingsSlot description for Gets the application settings of an app. +// GetWebSiteContainerLogs description for Gets the last lines of docker logs for the given site // 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 get the application settings -// for the production slot. -func (client AppsClient) ListApplicationSettingsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result StringDictionary, err error) { +// name - name of web app. +func (client AppsClient) GetWebSiteContainerLogs(ctx context.Context, resourceGroupName string, name string) (result ReadCloser, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListApplicationSettingsSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetWebSiteContainerLogs") defer func() { sc := -1 if result.Response.Response != nil { @@ -16181,36 +16194,35 @@ func (client AppsClient) ListApplicationSettingsSlot(ctx context.Context, resour 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", "ListApplicationSettingsSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetWebSiteContainerLogs", err.Error()) } - req, err := client.ListApplicationSettingsSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.GetWebSiteContainerLogsPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListApplicationSettingsSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebSiteContainerLogs", nil, "Failure preparing request") return } - resp, err := client.ListApplicationSettingsSlotSender(req) + resp, err := client.GetWebSiteContainerLogsSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListApplicationSettingsSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebSiteContainerLogs", resp, "Failure sending request") return } - result, err = client.ListApplicationSettingsSlotResponder(resp) + result, err = client.GetWebSiteContainerLogsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListApplicationSettingsSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebSiteContainerLogs", resp, "Failure responding to request") } return } -// ListApplicationSettingsSlotPreparer prepares the ListApplicationSettingsSlot request. -func (client AppsClient) ListApplicationSettingsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// GetWebSiteContainerLogsPreparer prepares the GetWebSiteContainerLogs request. +func (client AppsClient) GetWebSiteContainerLogsPreparer(ctx context.Context, resourceGroupName string, name 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), } @@ -16222,38 +16234,38 @@ func (client AppsClient) ListApplicationSettingsSlotPreparer(ctx context.Context preparer := autorest.CreatePreparer( autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListApplicationSettingsSlotSender sends the ListApplicationSettingsSlot request. The method will close the +// GetWebSiteContainerLogsSender sends the GetWebSiteContainerLogs request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListApplicationSettingsSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetWebSiteContainerLogsSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListApplicationSettingsSlotResponder handles the response to the ListApplicationSettingsSlot request. The method always +// GetWebSiteContainerLogsResponder handles the response to the GetWebSiteContainerLogs request. The method always // closes the http.Response Body. -func (client AppsClient) ListApplicationSettingsSlotResponder(resp *http.Response) (result StringDictionary, err error) { +func (client AppsClient) GetWebSiteContainerLogsResponder(resp *http.Response) (result ReadCloser, err error) { + result.Value = &resp.Body err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent)) result.Response = autorest.Response{Response: resp} return } -// ListAzureStorageAccounts description for Gets the Azure storage account configurations of an app. +// GetWebSiteContainerLogsSlot description for Gets the last lines of docker logs for the given site // 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) { +// name - name of web app. +// slot - name of web app slot. If not specified then will default to production slot. +func (client AppsClient) GetWebSiteContainerLogsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result ReadCloser, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListAzureStorageAccounts") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetWebSiteContainerLogsSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -16267,35 +16279,36 @@ func (client AppsClient) ListAzureStorageAccounts(ctx context.Context, resourceG 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()) + return result, validation.NewError("web.AppsClient", "GetWebSiteContainerLogsSlot", err.Error()) } - req, err := client.ListAzureStorageAccountsPreparer(ctx, resourceGroupName, name) + req, err := client.GetWebSiteContainerLogsSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListAzureStorageAccounts", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebSiteContainerLogsSlot", nil, "Failure preparing request") return } - resp, err := client.ListAzureStorageAccountsSender(req) + resp, err := client.GetWebSiteContainerLogsSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListAzureStorageAccounts", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebSiteContainerLogsSlot", resp, "Failure sending request") return } - result, err = client.ListAzureStorageAccountsResponder(resp) + result, err = client.GetWebSiteContainerLogsSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListAzureStorageAccounts", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebSiteContainerLogsSlot", 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) { +// GetWebSiteContainerLogsSlotPreparer prepares the GetWebSiteContainerLogsSlot request. +func (client AppsClient) GetWebSiteContainerLogsSlotPreparer(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), } @@ -16307,44 +16320,42 @@ func (client AppsClient) ListAzureStorageAccountsPreparer(ctx context.Context, r 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.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListAzureStorageAccountsSender sends the ListAzureStorageAccounts request. The method will close the +// GetWebSiteContainerLogsSlotSender sends the GetWebSiteContainerLogsSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListAzureStorageAccountsSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetWebSiteContainerLogsSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListAzureStorageAccountsResponder handles the response to the ListAzureStorageAccounts request. The method always +// GetWebSiteContainerLogsSlotResponder handles the response to the GetWebSiteContainerLogsSlot request. The method always // closes the http.Response Body. -func (client AppsClient) ListAzureStorageAccountsResponder(resp *http.Response) (result AzureStoragePropertyDictionaryResource, err error) { +func (client AppsClient) GetWebSiteContainerLogsSlotResponder(resp *http.Response) (result ReadCloser, err error) { + result.Value = &resp.Body err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent)) result.Response = autorest.Response{Response: resp} return } -// ListAzureStorageAccountsSlot description for Gets the Azure storage account configurations of an app. +// InstallSiteExtension description for Install site extension on a web site, or a deployment slot. // 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) { +// name - site name. +// siteExtensionID - site extension name. +func (client AppsClient) InstallSiteExtension(ctx context.Context, resourceGroupName string, name string, siteExtensionID string) (result AppsInstallSiteExtensionFuture, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListAzureStorageAccountsSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.InstallSiteExtension") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.Response() != nil { + sc = result.Response().StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -16354,36 +16365,30 @@ func (client AppsClient) ListAzureStorageAccountsSlot(ctx context.Context, resou 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()) + return result, validation.NewError("web.AppsClient", "InstallSiteExtension", err.Error()) } - req, err := client.ListAzureStorageAccountsSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.InstallSiteExtensionPreparer(ctx, resourceGroupName, name, siteExtensionID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListAzureStorageAccountsSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "InstallSiteExtension", nil, "Failure preparing request") return } - resp, err := client.ListAzureStorageAccountsSlotSender(req) + result, err = client.InstallSiteExtensionSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListAzureStorageAccountsSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "InstallSiteExtension", result.Response(), "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) { +// InstallSiteExtensionPreparer prepares the InstallSiteExtension request. +func (client AppsClient) InstallSiteExtensionPreparer(ctx context.Context, resourceGroupName string, name string, siteExtensionID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), + "siteExtensionId": autorest.Encode("path", siteExtensionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -16393,44 +16398,139 @@ func (client AppsClient) ListAzureStorageAccountsSlotPreparer(ctx context.Contex } preparer := autorest.CreatePreparer( - autorest.AsPost(), + autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListAzureStorageAccountsSlotSender sends the ListAzureStorageAccountsSlot request. The method will close the +// InstallSiteExtensionSender sends the InstallSiteExtension request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListAzureStorageAccountsSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) InstallSiteExtensionSender(req *http.Request) (future AppsInstallSiteExtensionFuture, err error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return } -// ListAzureStorageAccountsSlotResponder handles the response to the ListAzureStorageAccountsSlot request. The method always +// InstallSiteExtensionResponder handles the response to the InstallSiteExtension request. The method always // closes the http.Response Body. -func (client AppsClient) ListAzureStorageAccountsSlotResponder(resp *http.Response) (result AzureStoragePropertyDictionaryResource, err error) { +func (client AppsClient) InstallSiteExtensionResponder(resp *http.Response) (result SiteExtensionInfo, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusTooManyRequests), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// ListBackups description for Gets existing backups of an app. +// InstallSiteExtensionSlot description for Install site extension on a web site, or a deployment slot. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - site name. +// siteExtensionID - site extension name. +// slot - name of the deployment slot. If a slot is not specified, the API uses the production slot. +func (client AppsClient) InstallSiteExtensionSlot(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string) (result AppsInstallSiteExtensionSlotFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.InstallSiteExtensionSlot") + 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}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "InstallSiteExtensionSlot", err.Error()) + } + + req, err := client.InstallSiteExtensionSlotPreparer(ctx, resourceGroupName, name, siteExtensionID, slot) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "InstallSiteExtensionSlot", nil, "Failure preparing request") + return + } + + result, err = client.InstallSiteExtensionSlotSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "InstallSiteExtensionSlot", result.Response(), "Failure sending request") + return + } + + return +} + +// InstallSiteExtensionSlotPreparer prepares the InstallSiteExtensionSlot request. +func (client AppsClient) InstallSiteExtensionSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "siteExtensionId": autorest.Encode("path", siteExtensionID), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// InstallSiteExtensionSlotSender sends the InstallSiteExtensionSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) InstallSiteExtensionSlotSender(req *http.Request) (future AppsInstallSiteExtensionSlotFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// InstallSiteExtensionSlotResponder handles the response to the InstallSiteExtensionSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) InstallSiteExtensionSlotResponder(resp *http.Response) (result SiteExtensionInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusTooManyRequests), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// IsCloneable description for Shows whether an app can be cloned to another resource group or subscription. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -func (client AppsClient) ListBackups(ctx context.Context, resourceGroupName string, name string) (result BackupItemCollectionPage, err error) { +func (client AppsClient) IsCloneable(ctx context.Context, resourceGroupName string, name string) (result SiteCloneability, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBackups") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.IsCloneable") defer func() { sc := -1 - if result.bic.Response.Response != nil { - sc = result.bic.Response.Response.StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -16440,36 +16540,122 @@ func (client AppsClient) ListBackups(ctx context.Context, resourceGroupName stri 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", "ListBackups", err.Error()) + return result, validation.NewError("web.AppsClient", "IsCloneable", err.Error()) } - result.fn = client.listBackupsNextResults - req, err := client.ListBackupsPreparer(ctx, resourceGroupName, name) + req, err := client.IsCloneablePreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackups", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "IsCloneable", nil, "Failure preparing request") return } - resp, err := client.ListBackupsSender(req) + resp, err := client.IsCloneableSender(req) if err != nil { - result.bic.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackups", resp, "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "IsCloneable", resp, "Failure sending request") return } - result.bic, err = client.ListBackupsResponder(resp) + result, err = client.IsCloneableResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackups", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "IsCloneable", resp, "Failure responding to request") } return } -// ListBackupsPreparer prepares the ListBackups request. -func (client AppsClient) ListBackupsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// IsCloneablePreparer prepares the IsCloneable request. +func (client AppsClient) IsCloneablePreparer(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 = "2019-08-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}/iscloneable", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// IsCloneableSender sends the IsCloneable request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) IsCloneableSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// IsCloneableResponder handles the response to the IsCloneable request. The method always +// closes the http.Response Body. +func (client AppsClient) IsCloneableResponder(resp *http.Response) (result SiteCloneability, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// IsCloneableSlot description for Shows whether an app can be cloned to another resource group or subscription. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the app. +// slot - name of the deployment slot. By default, this API returns information on the production slot. +func (client AppsClient) IsCloneableSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteCloneability, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.IsCloneableSlot") + 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}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "IsCloneableSlot", err.Error()) + } + + req, err := client.IsCloneableSlotPreparer(ctx, resourceGroupName, name, slot) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "IsCloneableSlot", nil, "Failure preparing request") + return + } + + resp, err := client.IsCloneableSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "IsCloneableSlot", resp, "Failure sending request") + return + } + + result, err = client.IsCloneableSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "IsCloneableSlot", resp, "Failure responding to request") + } + + return +} + +// IsCloneableSlotPreparer prepares the IsCloneableSlot request. +func (client AppsClient) IsCloneableSlotPreparer(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), } @@ -16478,24 +16664,1022 @@ func (client AppsClient) ListBackupsPreparer(ctx context.Context, resourceGroupN "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}/iscloneable", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// IsCloneableSlotSender sends the IsCloneableSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) IsCloneableSlotSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// IsCloneableSlotResponder handles the response to the IsCloneableSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) IsCloneableSlotResponder(resp *http.Response) (result SiteCloneability, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List description for Get all apps for a subscription. +func (client AppsClient) List(ctx context.Context) (result AppCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.List") + defer func() { + sc := -1 + if result.ac.Response.Response != nil { + sc = result.ac.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.ac.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "List", resp, "Failure sending request") + return + } + + result.ac, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client AppsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites", 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 AppsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client AppsClient) ListResponder(resp *http.Response) (result AppCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client AppsClient) listNextResults(ctx context.Context, lastResults AppCollection) (result AppCollection, err error) { + req, err := lastResults.appCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppsClient) ListComplete(ctx context.Context) (result AppCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.List") + 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.List(ctx) + return +} + +// ListApplicationSettings description for Gets the application settings of an app. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the app. +func (client AppsClient) ListApplicationSettings(ctx context.Context, resourceGroupName string, name string) (result StringDictionary, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListApplicationSettings") + 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}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "ListApplicationSettings", err.Error()) + } + + req, err := client.ListApplicationSettingsPreparer(ctx, resourceGroupName, name) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListApplicationSettings", nil, "Failure preparing request") + return + } + + resp, err := client.ListApplicationSettingsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListApplicationSettings", resp, "Failure sending request") + return + } + + result, err = client.ListApplicationSettingsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListApplicationSettings", resp, "Failure responding to request") + } + + return +} + +// ListApplicationSettingsPreparer prepares the ListApplicationSettings request. +func (client AppsClient) ListApplicationSettingsPreparer(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 = "2019-08-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/appsettings/list", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListApplicationSettingsSender sends the ListApplicationSettings request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListApplicationSettingsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListApplicationSettingsResponder handles the response to the ListApplicationSettings request. The method always +// closes the http.Response Body. +func (client AppsClient) ListApplicationSettingsResponder(resp *http.Response) (result StringDictionary, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListApplicationSettingsSlot description for Gets the application settings 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 get the application settings +// for the production slot. +func (client AppsClient) ListApplicationSettingsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result StringDictionary, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListApplicationSettingsSlot") + 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}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "ListApplicationSettingsSlot", err.Error()) + } + + req, err := client.ListApplicationSettingsSlotPreparer(ctx, resourceGroupName, name, slot) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListApplicationSettingsSlot", nil, "Failure preparing request") + return + } + + resp, err := client.ListApplicationSettingsSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListApplicationSettingsSlot", resp, "Failure sending request") + return + } + + result, err = client.ListApplicationSettingsSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListApplicationSettingsSlot", resp, "Failure responding to request") + } + + return +} + +// ListApplicationSettingsSlotPreparer prepares the ListApplicationSettingsSlot request. +func (client AppsClient) ListApplicationSettingsSlotPreparer(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 = "2019-08-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/appsettings/list", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListApplicationSettingsSlotSender sends the ListApplicationSettingsSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListApplicationSettingsSlotSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListApplicationSettingsSlotResponder handles the response to the ListApplicationSettingsSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) ListApplicationSettingsSlotResponder(resp *http.Response) (result StringDictionary, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListAzureStorageAccounts description for 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 tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListAzureStorageAccounts") + 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}, + {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 = "2019-08-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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 description for 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 tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListAzureStorageAccountsSlot") + 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}, + {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 = "2019-08-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) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// 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 description for Gets existing backups of an app. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the app. +func (client AppsClient) ListBackups(ctx context.Context, resourceGroupName string, name string) (result BackupItemCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBackups") + defer func() { + sc := -1 + if result.bic.Response.Response != nil { + sc = result.bic.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}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "ListBackups", err.Error()) + } + + result.fn = client.listBackupsNextResults + req, err := client.ListBackupsPreparer(ctx, resourceGroupName, name) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackups", nil, "Failure preparing request") + return + } + + resp, err := client.ListBackupsSender(req) + if err != nil { + result.bic.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackups", resp, "Failure sending request") + return + } + + result.bic, err = client.ListBackupsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackups", resp, "Failure responding to request") + } + + return +} + +// ListBackupsPreparer prepares the ListBackups request. +func (client AppsClient) ListBackupsPreparer(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 = "2019-08-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.Web/sites/{name}/backups", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListBackupsSender sends the ListBackups request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListBackupsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListBackupsResponder handles the response to the ListBackups request. The method always +// closes the http.Response Body. +func (client AppsClient) ListBackupsResponder(resp *http.Response) (result BackupItemCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listBackupsNextResults retrieves the next set of results, if any. +func (client AppsClient) listBackupsNextResults(ctx context.Context, lastResults BackupItemCollection) (result BackupItemCollection, err error) { + req, err := lastResults.backupItemCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listBackupsNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListBackupsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listBackupsNextResults", resp, "Failure sending next results request") + } + result, err = client.ListBackupsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "listBackupsNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListBackupsComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppsClient) ListBackupsComplete(ctx context.Context, resourceGroupName string, name string) (result BackupItemCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBackups") + 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.ListBackups(ctx, resourceGroupName, name) + return +} + +// ListBackupsSlot description for Gets existing backups 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 get backups of the production +// slot. +func (client AppsClient) ListBackupsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result BackupItemCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBackupsSlot") + defer func() { + sc := -1 + if result.bic.Response.Response != nil { + sc = result.bic.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}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "ListBackupsSlot", err.Error()) + } + + result.fn = client.listBackupsSlotNextResults + req, err := client.ListBackupsSlotPreparer(ctx, resourceGroupName, name, slot) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupsSlot", nil, "Failure preparing request") + return + } + + resp, err := client.ListBackupsSlotSender(req) + if err != nil { + result.bic.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupsSlot", resp, "Failure sending request") + return + } + + result.bic, err = client.ListBackupsSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupsSlot", resp, "Failure responding to request") + } + + return +} + +// ListBackupsSlotPreparer prepares the ListBackupsSlot request. +func (client AppsClient) ListBackupsSlotPreparer(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 = "2019-08-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.Web/sites/{name}/slots/{slot}/backups", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListBackupsSlotSender sends the ListBackupsSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListBackupsSlotSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListBackupsSlotResponder handles the response to the ListBackupsSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) ListBackupsSlotResponder(resp *http.Response) (result BackupItemCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listBackupsSlotNextResults retrieves the next set of results, if any. +func (client AppsClient) listBackupsSlotNextResults(ctx context.Context, lastResults BackupItemCollection) (result BackupItemCollection, err error) { + req, err := lastResults.backupItemCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listBackupsSlotNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListBackupsSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listBackupsSlotNextResults", resp, "Failure sending next results request") + } + result, err = client.ListBackupsSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "listBackupsSlotNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListBackupsSlotComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppsClient) ListBackupsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result BackupItemCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBackupsSlot") + 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.ListBackupsSlot(ctx, resourceGroupName, name, slot) + return +} + +// ListBackupStatusSecrets description for Gets status of a web app backup that may be in progress, including secrets +// associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup +// if a new URL is passed in the request body. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of web app. +// backupID - ID of backup. +// request - information on backup request. +func (client AppsClient) ListBackupStatusSecrets(ctx context.Context, resourceGroupName string, name string, backupID string, request BackupRequest) (result BackupItem, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBackupStatusSecrets") + 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}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}, + {TargetValue: request, + Constraints: []validation.Constraint{{Target: "request.BackupRequestProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "request.BackupRequestProperties.BackupSchedule", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.BackupSchedule.FrequencyInterval", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "request.BackupRequestProperties.BackupSchedule.KeepAtLeastOneBackup", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "request.BackupRequestProperties.BackupSchedule.RetentionPeriodInDays", Name: validation.Null, Rule: true, Chain: nil}, + }}, + }}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "ListBackupStatusSecrets", err.Error()) + } + + req, err := client.ListBackupStatusSecretsPreparer(ctx, resourceGroupName, name, backupID, request) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecrets", nil, "Failure preparing request") + return + } + + resp, err := client.ListBackupStatusSecretsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecrets", resp, "Failure sending request") + return + } + + result, err = client.ListBackupStatusSecretsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecrets", resp, "Failure responding to request") + } + + return +} + +// ListBackupStatusSecretsPreparer prepares the ListBackupStatusSecrets request. +func (client AppsClient) ListBackupStatusSecretsPreparer(ctx context.Context, resourceGroupName string, name string, backupID string, request BackupRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "backupId": autorest.Encode("path", backupID), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list", pathParameters), + autorest.WithJSON(request), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListBackupStatusSecretsSender sends the ListBackupStatusSecrets request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListBackupStatusSecretsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListBackupStatusSecretsResponder handles the response to the ListBackupStatusSecrets request. The method always +// closes the http.Response Body. +func (client AppsClient) ListBackupStatusSecretsResponder(resp *http.Response) (result BackupItem, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListBackupStatusSecretsSlot description for Gets status of a web app backup that may be in progress, including +// secrets associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for +// the backup if a new URL is passed in the request body. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of web app. +// backupID - ID of backup. +// request - information on backup request. +// slot - name of web app slot. If not specified then will default to production slot. +func (client AppsClient) ListBackupStatusSecretsSlot(ctx context.Context, resourceGroupName string, name string, backupID string, request BackupRequest, slot string) (result BackupItem, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBackupStatusSecretsSlot") + 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}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}, + {TargetValue: request, + Constraints: []validation.Constraint{{Target: "request.BackupRequestProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "request.BackupRequestProperties.BackupSchedule", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.BackupSchedule.FrequencyInterval", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "request.BackupRequestProperties.BackupSchedule.KeepAtLeastOneBackup", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "request.BackupRequestProperties.BackupSchedule.RetentionPeriodInDays", Name: validation.Null, Rule: true, Chain: nil}, + }}, + }}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "ListBackupStatusSecretsSlot", err.Error()) + } + + req, err := client.ListBackupStatusSecretsSlotPreparer(ctx, resourceGroupName, name, backupID, request, slot) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecretsSlot", nil, "Failure preparing request") + return + } + + resp, err := client.ListBackupStatusSecretsSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecretsSlot", resp, "Failure sending request") + return + } + + result, err = client.ListBackupStatusSecretsSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecretsSlot", resp, "Failure responding to request") + } + + return +} + +// ListBackupStatusSecretsSlotPreparer prepares the ListBackupStatusSecretsSlot request. +func (client AppsClient) ListBackupStatusSecretsSlotPreparer(ctx context.Context, resourceGroupName string, name string, backupID string, request BackupRequest, slot string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "backupId": autorest.Encode("path", backupID), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list", pathParameters), + autorest.WithJSON(request), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListBackupStatusSecretsSlotSender sends the ListBackupStatusSecretsSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListBackupStatusSecretsSlotSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListBackupStatusSecretsSlotResponder handles the response to the ListBackupStatusSecretsSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) ListBackupStatusSecretsSlotResponder(resp *http.Response) (result BackupItem, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByResourceGroup description for Gets all web, mobile, and API apps in the specified resource group. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// includeSlots - specify true to include deployment slots in results. The default is false, +// which only gives you the production slot of all apps. +func (client AppsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, includeSlots *bool) (result AppCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.ac.Response.Response != nil { + sc = result.ac.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}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "ListByResourceGroup", err.Error()) + } + + result.fn = client.listByResourceGroupNextResults + req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName, includeSlots) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.ac.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.ac, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client AppsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string, includeSlots *bool) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if includeSlots != nil { + queryParameters["includeSlots"] = autorest.Encode("query", *includeSlots) + } + preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListBackupsSender sends the ListBackups request. The method will close the +// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListBackupsSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListBackupsResponder handles the response to the ListBackups request. The method always +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always // closes the http.Response Body. -func (client AppsClient) ListBackupsResponder(resp *http.Response) (result BackupItemCollection, err error) { +func (client AppsClient) ListByResourceGroupResponder(resp *http.Response) (result AppCollection, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -16506,31 +17690,31 @@ func (client AppsClient) ListBackupsResponder(resp *http.Response) (result Backu return } -// listBackupsNextResults retrieves the next set of results, if any. -func (client AppsClient) listBackupsNextResults(ctx context.Context, lastResults BackupItemCollection) (result BackupItemCollection, err error) { - req, err := lastResults.backupItemCollectionPreparer(ctx) +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client AppsClient) listByResourceGroupNextResults(ctx context.Context, lastResults AppCollection) (result AppCollection, err error) { + req, err := lastResults.appCollectionPreparer(ctx) if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listBackupsNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") } if req == nil { return } - resp, err := client.ListBackupsSender(req) + resp, err := client.ListByResourceGroupSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listBackupsNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") } - result, err = client.ListBackupsResponder(resp) + result, err = client.ListByResourceGroupResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "listBackupsNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") } return } -// ListBackupsComplete enumerates all values, automatically crossing page boundaries as required. -func (client AppsClient) ListBackupsComplete(ctx context.Context, resourceGroupName string, name string) (result BackupItemCollectionIterator, err error) { +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, includeSlots *bool) (result AppCollectionIterator, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBackups") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListByResourceGroup") defer func() { sc := -1 if result.Response().Response.Response != nil { @@ -16539,23 +17723,21 @@ func (client AppsClient) ListBackupsComplete(ctx context.Context, resourceGroupN tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListBackups(ctx, resourceGroupName, name) + result.page, err = client.ListByResourceGroup(ctx, resourceGroupName, includeSlots) return } -// ListBackupsSlot description for Gets existing backups of an app. +// ListConfigurations description for List the 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 get backups of the production -// slot. -func (client AppsClient) ListBackupsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result BackupItemCollectionPage, err error) { +func (client AppsClient) ListConfigurations(ctx context.Context, resourceGroupName string, name string) (result SiteConfigResourceCollectionPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBackupsSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurations") defer func() { sc := -1 - if result.bic.Response.Response != nil { - sc = result.bic.Response.Response.StatusCode + if result.scrc.Response.Response != nil { + sc = result.scrc.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -16565,37 +17747,36 @@ func (client AppsClient) ListBackupsSlot(ctx context.Context, 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", "ListBackupsSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "ListConfigurations", err.Error()) } - result.fn = client.listBackupsSlotNextResults - req, err := client.ListBackupsSlotPreparer(ctx, resourceGroupName, name, slot) + result.fn = client.listConfigurationsNextResults + req, err := client.ListConfigurationsPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupsSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurations", nil, "Failure preparing request") return } - resp, err := client.ListBackupsSlotSender(req) + resp, err := client.ListConfigurationsSender(req) if err != nil { - result.bic.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupsSlot", resp, "Failure sending request") + result.scrc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurations", resp, "Failure sending request") return } - result.bic, err = client.ListBackupsSlotResponder(resp) + result.scrc, err = client.ListConfigurationsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupsSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurations", resp, "Failure responding to request") } return } -// ListBackupsSlotPreparer prepares the ListBackupsSlot request. -func (client AppsClient) ListBackupsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// ListConfigurationsPreparer prepares the ListConfigurations request. +func (client AppsClient) ListConfigurationsPreparer(ctx context.Context, resourceGroupName string, name 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), } @@ -16607,21 +17788,21 @@ func (client AppsClient) ListBackupsSlotPreparer(ctx context.Context, resourceGr preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListBackupsSlotSender sends the ListBackupsSlot request. The method will close the +// ListConfigurationsSender sends the ListConfigurations request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListBackupsSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListConfigurationsSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListBackupsSlotResponder handles the response to the ListBackupsSlot request. The method always +// ListConfigurationsResponder handles the response to the ListConfigurations request. The method always // closes the http.Response Body. -func (client AppsClient) ListBackupsSlotResponder(resp *http.Response) (result BackupItemCollection, err error) { +func (client AppsClient) ListConfigurationsResponder(resp *http.Response) (result SiteConfigResourceCollection, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -16632,31 +17813,31 @@ func (client AppsClient) ListBackupsSlotResponder(resp *http.Response) (result B return } -// listBackupsSlotNextResults retrieves the next set of results, if any. -func (client AppsClient) listBackupsSlotNextResults(ctx context.Context, lastResults BackupItemCollection) (result BackupItemCollection, err error) { - req, err := lastResults.backupItemCollectionPreparer(ctx) +// listConfigurationsNextResults retrieves the next set of results, if any. +func (client AppsClient) listConfigurationsNextResults(ctx context.Context, lastResults SiteConfigResourceCollection) (result SiteConfigResourceCollection, err error) { + req, err := lastResults.siteConfigResourceCollectionPreparer(ctx) if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listBackupsSlotNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationsNextResults", nil, "Failure preparing next results request") } if req == nil { return } - resp, err := client.ListBackupsSlotSender(req) + resp, err := client.ListConfigurationsSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listBackupsSlotNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationsNextResults", resp, "Failure sending next results request") } - result, err = client.ListBackupsSlotResponder(resp) + result, err = client.ListConfigurationsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "listBackupsSlotNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationsNextResults", resp, "Failure responding to next results request") } return } -// ListBackupsSlotComplete enumerates all values, automatically crossing page boundaries as required. -func (client AppsClient) ListBackupsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result BackupItemCollectionIterator, err error) { +// ListConfigurationsComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppsClient) ListConfigurationsComplete(ctx context.Context, resourceGroupName string, name string) (result SiteConfigResourceCollectionIterator, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBackupsSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurations") defer func() { sc := -1 if result.Response().Response.Response != nil { @@ -16665,25 +17846,22 @@ func (client AppsClient) ListBackupsSlotComplete(ctx context.Context, resourceGr tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListBackupsSlot(ctx, resourceGroupName, name, slot) + result.page, err = client.ListConfigurations(ctx, resourceGroupName, name) return } -// ListBackupStatusSecrets description for Gets status of a web app backup that may be in progress, including secrets -// associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup -// if a new URL is passed in the request body. +// ListConfigurationSnapshotInfo description for Gets a list of web app configuration snapshots identifiers. Each +// element of the list contains a timestamp and the ID of the snapshot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of web app. -// backupID - ID of backup. -// request - information on backup request. -func (client AppsClient) ListBackupStatusSecrets(ctx context.Context, resourceGroupName string, name string, backupID string, request BackupRequest) (result BackupItem, err error) { +// name - name of the app. +func (client AppsClient) ListConfigurationSnapshotInfo(ctx context.Context, resourceGroupName string, name string) (result SiteConfigurationSnapshotInfoCollectionPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBackupStatusSecrets") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationSnapshotInfo") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.scsic.Response.Response != nil { + sc = result.scsic.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -16692,44 +17870,35 @@ func (client AppsClient) ListBackupStatusSecrets(ctx context.Context, resourceGr {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: request, - Constraints: []validation.Constraint{{Target: "request.BackupRequestProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "request.BackupRequestProperties.BackupSchedule", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.BackupSchedule.FrequencyInterval", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "request.BackupRequestProperties.BackupSchedule.KeepAtLeastOneBackup", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "request.BackupRequestProperties.BackupSchedule.RetentionPeriodInDays", Name: validation.Null, Rule: true, Chain: nil}, - }}, - }}}}}); err != nil { - return result, validation.NewError("web.AppsClient", "ListBackupStatusSecrets", err.Error()) + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "ListConfigurationSnapshotInfo", err.Error()) } - req, err := client.ListBackupStatusSecretsPreparer(ctx, resourceGroupName, name, backupID, request) + result.fn = client.listConfigurationSnapshotInfoNextResults + req, err := client.ListConfigurationSnapshotInfoPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecrets", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfo", nil, "Failure preparing request") return } - resp, err := client.ListBackupStatusSecretsSender(req) + resp, err := client.ListConfigurationSnapshotInfoSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecrets", resp, "Failure sending request") + result.scsic.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfo", resp, "Failure sending request") return } - result, err = client.ListBackupStatusSecretsResponder(resp) + result.scsic, err = client.ListConfigurationSnapshotInfoResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecrets", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfo", resp, "Failure responding to request") } return } -// ListBackupStatusSecretsPreparer prepares the ListBackupStatusSecrets request. -func (client AppsClient) ListBackupStatusSecretsPreparer(ctx context.Context, resourceGroupName string, name string, backupID string, request BackupRequest) (*http.Request, error) { +// ListConfigurationSnapshotInfoPreparer prepares the ListConfigurationSnapshotInfo request. +func (client AppsClient) ListConfigurationSnapshotInfoPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "backupId": autorest.Encode("path", backupID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -16741,25 +17910,23 @@ func (client AppsClient) ListBackupStatusSecretsPreparer(ctx context.Context, re } preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), + autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list", pathParameters), - autorest.WithJSON(request), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListBackupStatusSecretsSender sends the ListBackupStatusSecrets request. The method will close the +// ListConfigurationSnapshotInfoSender sends the ListConfigurationSnapshotInfo request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListBackupStatusSecretsSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListConfigurationSnapshotInfoSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListBackupStatusSecretsResponder handles the response to the ListBackupStatusSecrets request. The method always +// ListConfigurationSnapshotInfoResponder handles the response to the ListConfigurationSnapshotInfo request. The method always // closes the http.Response Body. -func (client AppsClient) ListBackupStatusSecretsResponder(resp *http.Response) (result BackupItem, err error) { +func (client AppsClient) ListConfigurationSnapshotInfoResponder(resp *http.Response) (result SiteConfigurationSnapshotInfoCollection, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -16770,121 +17937,57 @@ func (client AppsClient) ListBackupStatusSecretsResponder(resp *http.Response) ( return } -// ListBackupStatusSecretsSlot description for Gets status of a web app backup that may be in progress, including -// secrets associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for -// the backup if a new URL is passed in the request body. -// Parameters: -// resourceGroupName - name of the resource group to which the resource belongs. -// name - name of web app. -// backupID - ID of backup. -// request - information on backup request. -// slot - name of web app slot. If not specified then will default to production slot. -func (client AppsClient) ListBackupStatusSecretsSlot(ctx context.Context, resourceGroupName string, name string, backupID string, request BackupRequest, slot string) (result BackupItem, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBackupStatusSecretsSlot") - 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}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}, - {TargetValue: request, - Constraints: []validation.Constraint{{Target: "request.BackupRequestProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "request.BackupRequestProperties.BackupSchedule", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.BackupSchedule.FrequencyInterval", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "request.BackupRequestProperties.BackupSchedule.KeepAtLeastOneBackup", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "request.BackupRequestProperties.BackupSchedule.RetentionPeriodInDays", Name: validation.Null, Rule: true, Chain: nil}, - }}, - }}}}}); err != nil { - return result, validation.NewError("web.AppsClient", "ListBackupStatusSecretsSlot", err.Error()) - } - - req, err := client.ListBackupStatusSecretsSlotPreparer(ctx, resourceGroupName, name, backupID, request, slot) +// listConfigurationSnapshotInfoNextResults retrieves the next set of results, if any. +func (client AppsClient) listConfigurationSnapshotInfoNextResults(ctx context.Context, lastResults SiteConfigurationSnapshotInfoCollection) (result SiteConfigurationSnapshotInfoCollection, err error) { + req, err := lastResults.siteConfigurationSnapshotInfoCollectionPreparer(ctx) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecretsSlot", nil, "Failure preparing request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoNextResults", nil, "Failure preparing next results request") + } + if req == nil { return } - - resp, err := client.ListBackupStatusSecretsSlotSender(req) + resp, err := client.ListConfigurationSnapshotInfoSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecretsSlot", resp, "Failure sending request") - return + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoNextResults", resp, "Failure sending next results request") } - - result, err = client.ListBackupStatusSecretsSlotResponder(resp) + result, err = client.ListConfigurationSnapshotInfoResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecretsSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoNextResults", resp, "Failure responding to next results request") } - return } -// ListBackupStatusSecretsSlotPreparer prepares the ListBackupStatusSecretsSlot request. -func (client AppsClient) ListBackupStatusSecretsSlotPreparer(ctx context.Context, resourceGroupName string, name string, backupID string, request BackupRequest, slot string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "backupId": autorest.Encode("path", backupID), - "name": autorest.Encode("path", name), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2019-08-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list", pathParameters), - autorest.WithJSON(request), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListBackupStatusSecretsSlotSender sends the ListBackupStatusSecretsSlot request. The method will close the -// http.Response Body if it receives an error. -func (client AppsClient) ListBackupStatusSecretsSlotSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) -} - -// ListBackupStatusSecretsSlotResponder handles the response to the ListBackupStatusSecretsSlot request. The method always -// closes the http.Response Body. -func (client AppsClient) ListBackupStatusSecretsSlotResponder(resp *http.Response) (result BackupItem, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} +// ListConfigurationSnapshotInfoComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppsClient) ListConfigurationSnapshotInfoComplete(ctx context.Context, resourceGroupName string, name string) (result SiteConfigurationSnapshotInfoCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationSnapshotInfo") + 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.ListConfigurationSnapshotInfo(ctx, resourceGroupName, name) return } -// ListByResourceGroup description for Gets all web, mobile, and API apps in the specified resource group. +// ListConfigurationSnapshotInfoSlot description for Gets a list of web app configuration snapshots identifiers. Each +// element of the list contains a timestamp and the ID of the snapshot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// includeSlots - specify true to include deployment slots in results. The default is false, -// which only gives you the production slot of all apps. -func (client AppsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, includeSlots *bool) (result AppCollectionPage, err error) { +// name - name of the app. +// slot - name of the deployment slot. If a slot is not specified, the API will return configuration for the +// production slot. +func (client AppsClient) ListConfigurationSnapshotInfoSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteConfigurationSnapshotInfoCollectionPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListByResourceGroup") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationSnapshotInfoSlot") defer func() { sc := -1 - if result.ac.Response.Response != nil { - sc = result.ac.Response.Response.StatusCode + if result.scsic.Response.Response != nil { + sc = result.scsic.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -16894,35 +17997,37 @@ func (client AppsClient) ListByResourceGroup(ctx context.Context, resourceGroupN 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", "ListByResourceGroup", err.Error()) + return result, validation.NewError("web.AppsClient", "ListConfigurationSnapshotInfoSlot", err.Error()) } - result.fn = client.listByResourceGroupNextResults - req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName, includeSlots) + result.fn = client.listConfigurationSnapshotInfoSlotNextResults + req, err := client.ListConfigurationSnapshotInfoSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListByResourceGroup", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfoSlot", nil, "Failure preparing request") return } - resp, err := client.ListByResourceGroupSender(req) + resp, err := client.ListConfigurationSnapshotInfoSlotSender(req) if err != nil { - result.ac.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListByResourceGroup", resp, "Failure sending request") + result.scsic.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfoSlot", resp, "Failure sending request") return } - result.ac, err = client.ListByResourceGroupResponder(resp) + result.scsic, err = client.ListConfigurationSnapshotInfoSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListByResourceGroup", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfoSlot", resp, "Failure responding to request") } return } -// ListByResourceGroupPreparer prepares the ListByResourceGroup request. -func (client AppsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string, includeSlots *bool) (*http.Request, error) { +// ListConfigurationSnapshotInfoSlotPreparer prepares the ListConfigurationSnapshotInfoSlot request. +func (client AppsClient) ListConfigurationSnapshotInfoSlotPreparer(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), } @@ -16930,28 +18035,25 @@ func (client AppsClient) ListByResourceGroupPreparer(ctx context.Context, resour queryParameters := map[string]interface{}{ "api-version": APIVersion, } - if includeSlots != nil { - queryParameters["includeSlots"] = autorest.Encode("query", *includeSlots) - } preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the +// ListConfigurationSnapshotInfoSlotSender sends the ListConfigurationSnapshotInfoSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListConfigurationSnapshotInfoSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// ListConfigurationSnapshotInfoSlotResponder handles the response to the ListConfigurationSnapshotInfoSlot request. The method always // closes the http.Response Body. -func (client AppsClient) ListByResourceGroupResponder(resp *http.Response) (result AppCollection, err error) { +func (client AppsClient) ListConfigurationSnapshotInfoSlotResponder(resp *http.Response) (result SiteConfigurationSnapshotInfoCollection, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -16962,31 +18064,31 @@ func (client AppsClient) ListByResourceGroupResponder(resp *http.Response) (resu return } -// listByResourceGroupNextResults retrieves the next set of results, if any. -func (client AppsClient) listByResourceGroupNextResults(ctx context.Context, lastResults AppCollection) (result AppCollection, err error) { - req, err := lastResults.appCollectionPreparer(ctx) +// listConfigurationSnapshotInfoSlotNextResults retrieves the next set of results, if any. +func (client AppsClient) listConfigurationSnapshotInfoSlotNextResults(ctx context.Context, lastResults SiteConfigurationSnapshotInfoCollection) (result SiteConfigurationSnapshotInfoCollection, err error) { + req, err := lastResults.siteConfigurationSnapshotInfoCollectionPreparer(ctx) if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoSlotNextResults", nil, "Failure preparing next results request") } if req == nil { return } - resp, err := client.ListByResourceGroupSender(req) + resp, err := client.ListConfigurationSnapshotInfoSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoSlotNextResults", resp, "Failure sending next results request") } - result, err = client.ListByResourceGroupResponder(resp) + result, err = client.ListConfigurationSnapshotInfoSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoSlotNextResults", resp, "Failure responding to next results request") } return } -// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client AppsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, includeSlots *bool) (result AppCollectionIterator, err error) { +// ListConfigurationSnapshotInfoSlotComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppsClient) ListConfigurationSnapshotInfoSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteConfigurationSnapshotInfoCollectionIterator, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListByResourceGroup") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationSnapshotInfoSlot") defer func() { sc := -1 if result.Response().Response.Response != nil { @@ -16995,17 +18097,19 @@ func (client AppsClient) ListByResourceGroupComplete(ctx context.Context, resour tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListByResourceGroup(ctx, resourceGroupName, includeSlots) + result.page, err = client.ListConfigurationSnapshotInfoSlot(ctx, resourceGroupName, name, slot) return } -// ListConfigurations description for List the configurations of an app +// ListConfigurationsSlot description for List the configurations of an app // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -func (client AppsClient) ListConfigurations(ctx context.Context, resourceGroupName string, name string) (result SiteConfigResourceCollectionPage, err error) { +// slot - name of the deployment slot. If a slot is not specified, the API will return configuration for the +// production slot. +func (client AppsClient) ListConfigurationsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteConfigResourceCollectionPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurations") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationsSlot") defer func() { sc := -1 if result.scrc.Response.Response != nil { @@ -17019,36 +18123,37 @@ func (client AppsClient) ListConfigurations(ctx context.Context, resourceGroupNa 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", "ListConfigurations", err.Error()) + return result, validation.NewError("web.AppsClient", "ListConfigurationsSlot", err.Error()) } - result.fn = client.listConfigurationsNextResults - req, err := client.ListConfigurationsPreparer(ctx, resourceGroupName, name) + result.fn = client.listConfigurationsSlotNextResults + req, err := client.ListConfigurationsSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurations", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationsSlot", nil, "Failure preparing request") return } - resp, err := client.ListConfigurationsSender(req) + resp, err := client.ListConfigurationsSlotSender(req) if err != nil { result.scrc.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurations", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationsSlot", resp, "Failure sending request") return } - result.scrc, err = client.ListConfigurationsResponder(resp) + result.scrc, err = client.ListConfigurationsSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurations", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationsSlot", resp, "Failure responding to request") } return } -// ListConfigurationsPreparer prepares the ListConfigurations request. -func (client AppsClient) ListConfigurationsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// ListConfigurationsSlotPreparer prepares the ListConfigurationsSlot request. +func (client AppsClient) ListConfigurationsSlotPreparer(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), } @@ -17060,21 +18165,21 @@ func (client AppsClient) ListConfigurationsPreparer(ctx context.Context, resourc preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListConfigurationsSender sends the ListConfigurations request. The method will close the +// ListConfigurationsSlotSender sends the ListConfigurationsSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListConfigurationsSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListConfigurationsSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListConfigurationsResponder handles the response to the ListConfigurations request. The method always +// ListConfigurationsSlotResponder handles the response to the ListConfigurationsSlot request. The method always // closes the http.Response Body. -func (client AppsClient) ListConfigurationsResponder(resp *http.Response) (result SiteConfigResourceCollection, err error) { +func (client AppsClient) ListConfigurationsSlotResponder(resp *http.Response) (result SiteConfigResourceCollection, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -17085,31 +18190,31 @@ func (client AppsClient) ListConfigurationsResponder(resp *http.Response) (resul return } -// listConfigurationsNextResults retrieves the next set of results, if any. -func (client AppsClient) listConfigurationsNextResults(ctx context.Context, lastResults SiteConfigResourceCollection) (result SiteConfigResourceCollection, err error) { +// listConfigurationsSlotNextResults retrieves the next set of results, if any. +func (client AppsClient) listConfigurationsSlotNextResults(ctx context.Context, lastResults SiteConfigResourceCollection) (result SiteConfigResourceCollection, err error) { req, err := lastResults.siteConfigResourceCollectionPreparer(ctx) if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationsNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationsSlotNextResults", nil, "Failure preparing next results request") } if req == nil { return } - resp, err := client.ListConfigurationsSender(req) + resp, err := client.ListConfigurationsSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationsNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationsSlotNextResults", resp, "Failure sending next results request") } - result, err = client.ListConfigurationsResponder(resp) + result, err = client.ListConfigurationsSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationsNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationsSlotNextResults", resp, "Failure responding to next results request") } return } -// ListConfigurationsComplete enumerates all values, automatically crossing page boundaries as required. -func (client AppsClient) ListConfigurationsComplete(ctx context.Context, resourceGroupName string, name string) (result SiteConfigResourceCollectionIterator, err error) { +// ListConfigurationsSlotComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppsClient) ListConfigurationsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteConfigResourceCollectionIterator, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurations") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationsSlot") defer func() { sc := -1 if result.Response().Response.Response != nil { @@ -17118,22 +18223,21 @@ func (client AppsClient) ListConfigurationsComplete(ctx context.Context, resourc tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListConfigurations(ctx, resourceGroupName, name) + result.page, err = client.ListConfigurationsSlot(ctx, resourceGroupName, name, slot) return } -// ListConfigurationSnapshotInfo description for Gets a list of web app configuration snapshots identifiers. Each -// element of the list contains a timestamp and the ID of the snapshot. +// ListConnectionStrings description for Gets the connection strings of an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -func (client AppsClient) ListConfigurationSnapshotInfo(ctx context.Context, resourceGroupName string, name string) (result SiteConfigurationSnapshotInfoCollectionPage, err error) { +func (client AppsClient) ListConnectionStrings(ctx context.Context, resourceGroupName string, name string) (result ConnectionStringDictionary, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationSnapshotInfo") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConnectionStrings") defer func() { sc := -1 - if result.scsic.Response.Response != nil { - sc = result.scsic.Response.Response.StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -17143,33 +18247,32 @@ func (client AppsClient) ListConfigurationSnapshotInfo(ctx context.Context, reso 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", "ListConfigurationSnapshotInfo", err.Error()) + return result, validation.NewError("web.AppsClient", "ListConnectionStrings", err.Error()) } - result.fn = client.listConfigurationSnapshotInfoNextResults - req, err := client.ListConfigurationSnapshotInfoPreparer(ctx, resourceGroupName, name) + req, err := client.ListConnectionStringsPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfo", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConnectionStrings", nil, "Failure preparing request") return } - resp, err := client.ListConfigurationSnapshotInfoSender(req) + resp, err := client.ListConnectionStringsSender(req) if err != nil { - result.scsic.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfo", resp, "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConnectionStrings", resp, "Failure sending request") return } - result.scsic, err = client.ListConfigurationSnapshotInfoResponder(resp) + result, err = client.ListConnectionStringsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfo", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConnectionStrings", resp, "Failure responding to request") } return } -// ListConfigurationSnapshotInfoPreparer prepares the ListConfigurationSnapshotInfo request. -func (client AppsClient) ListConfigurationSnapshotInfoPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// ListConnectionStringsPreparer prepares the ListConnectionStrings request. +func (client AppsClient) ListConnectionStringsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -17182,23 +18285,23 @@ func (client AppsClient) ListConfigurationSnapshotInfoPreparer(ctx context.Conte } preparer := autorest.CreatePreparer( - autorest.AsGet(), + autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListConfigurationSnapshotInfoSender sends the ListConfigurationSnapshotInfo request. The method will close the +// ListConnectionStringsSender sends the ListConnectionStrings request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListConfigurationSnapshotInfoSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListConnectionStringsSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListConfigurationSnapshotInfoResponder handles the response to the ListConfigurationSnapshotInfo request. The method always +// ListConnectionStringsResponder handles the response to the ListConnectionStrings request. The method always // closes the http.Response Body. -func (client AppsClient) ListConfigurationSnapshotInfoResponder(resp *http.Response) (result SiteConfigurationSnapshotInfoCollection, err error) { +func (client AppsClient) ListConnectionStringsResponder(resp *http.Response) (result ConnectionStringDictionary, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -17209,57 +18312,19 @@ func (client AppsClient) ListConfigurationSnapshotInfoResponder(resp *http.Respo return } -// listConfigurationSnapshotInfoNextResults retrieves the next set of results, if any. -func (client AppsClient) listConfigurationSnapshotInfoNextResults(ctx context.Context, lastResults SiteConfigurationSnapshotInfoCollection) (result SiteConfigurationSnapshotInfoCollection, err error) { - req, err := lastResults.siteConfigurationSnapshotInfoCollectionPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListConfigurationSnapshotInfoSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoNextResults", resp, "Failure sending next results request") - } - result, err = client.ListConfigurationSnapshotInfoResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListConfigurationSnapshotInfoComplete enumerates all values, automatically crossing page boundaries as required. -func (client AppsClient) ListConfigurationSnapshotInfoComplete(ctx context.Context, resourceGroupName string, name string) (result SiteConfigurationSnapshotInfoCollectionIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationSnapshotInfo") - 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.ListConfigurationSnapshotInfo(ctx, resourceGroupName, name) - return -} - -// ListConfigurationSnapshotInfoSlot description for Gets a list of web app configuration snapshots identifiers. Each -// element of the list contains a timestamp and the ID of the snapshot. +// ListConnectionStringsSlot description for Gets the connection strings 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 return configuration for the -// production slot. -func (client AppsClient) ListConfigurationSnapshotInfoSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteConfigurationSnapshotInfoCollectionPage, err error) { +// slot - name of the deployment slot. If a slot is not specified, the API will get the connection settings for +// the production slot. +func (client AppsClient) ListConnectionStringsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result ConnectionStringDictionary, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationSnapshotInfoSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConnectionStringsSlot") defer func() { - sc := -1 - if result.scsic.Response.Response != nil { - sc = result.scsic.Response.Response.StatusCode + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -17269,33 +18334,32 @@ func (client AppsClient) ListConfigurationSnapshotInfoSlot(ctx context.Context, 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", "ListConfigurationSnapshotInfoSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "ListConnectionStringsSlot", err.Error()) } - result.fn = client.listConfigurationSnapshotInfoSlotNextResults - req, err := client.ListConfigurationSnapshotInfoSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.ListConnectionStringsSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfoSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConnectionStringsSlot", nil, "Failure preparing request") return } - resp, err := client.ListConfigurationSnapshotInfoSlotSender(req) + resp, err := client.ListConnectionStringsSlotSender(req) if err != nil { - result.scsic.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfoSlot", resp, "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConnectionStringsSlot", resp, "Failure sending request") return } - result.scsic, err = client.ListConfigurationSnapshotInfoSlotResponder(resp) + result, err = client.ListConnectionStringsSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfoSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConnectionStringsSlot", resp, "Failure responding to request") } return } -// ListConfigurationSnapshotInfoSlotPreparer prepares the ListConfigurationSnapshotInfoSlot request. -func (client AppsClient) ListConfigurationSnapshotInfoSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// ListConnectionStringsSlotPreparer prepares the ListConnectionStringsSlot request. +func (client AppsClient) ListConnectionStringsSlotPreparer(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), @@ -17309,23 +18373,23 @@ func (client AppsClient) ListConfigurationSnapshotInfoSlotPreparer(ctx context.C } preparer := autorest.CreatePreparer( - autorest.AsGet(), + autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListConfigurationSnapshotInfoSlotSender sends the ListConfigurationSnapshotInfoSlot request. The method will close the +// ListConnectionStringsSlotSender sends the ListConnectionStringsSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListConfigurationSnapshotInfoSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListConnectionStringsSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListConfigurationSnapshotInfoSlotResponder handles the response to the ListConfigurationSnapshotInfoSlot request. The method always +// ListConnectionStringsSlotResponder handles the response to the ListConnectionStringsSlot request. The method always // closes the http.Response Body. -func (client AppsClient) ListConfigurationSnapshotInfoSlotResponder(resp *http.Response) (result SiteConfigurationSnapshotInfoCollection, err error) { +func (client AppsClient) ListConnectionStringsSlotResponder(resp *http.Response) (result ConnectionStringDictionary, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -17336,56 +18400,17 @@ func (client AppsClient) ListConfigurationSnapshotInfoSlotResponder(resp *http.R return } -// listConfigurationSnapshotInfoSlotNextResults retrieves the next set of results, if any. -func (client AppsClient) listConfigurationSnapshotInfoSlotNextResults(ctx context.Context, lastResults SiteConfigurationSnapshotInfoCollection) (result SiteConfigurationSnapshotInfoCollection, err error) { - req, err := lastResults.siteConfigurationSnapshotInfoCollectionPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoSlotNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListConfigurationSnapshotInfoSlotSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoSlotNextResults", resp, "Failure sending next results request") - } - result, err = client.ListConfigurationSnapshotInfoSlotResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoSlotNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListConfigurationSnapshotInfoSlotComplete enumerates all values, automatically crossing page boundaries as required. -func (client AppsClient) ListConfigurationSnapshotInfoSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteConfigurationSnapshotInfoCollectionIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationSnapshotInfoSlot") - 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.ListConfigurationSnapshotInfoSlot(ctx, resourceGroupName, name, slot) - return -} - -// ListConfigurationsSlot description for List the configurations of an app +// ListContinuousWebJobs description for List continuous web jobs for an app, or a deployment slot. // 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 return configuration for the -// production slot. -func (client AppsClient) ListConfigurationsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteConfigResourceCollectionPage, err error) { +// name - site name. +func (client AppsClient) ListContinuousWebJobs(ctx context.Context, resourceGroupName string, name string) (result ContinuousWebJobCollectionPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationsSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListContinuousWebJobs") defer func() { sc := -1 - if result.scrc.Response.Response != nil { - sc = result.scrc.Response.Response.StatusCode + if result.cwjc.Response.Response != nil { + sc = result.cwjc.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -17395,37 +18420,36 @@ func (client AppsClient) ListConfigurationsSlot(ctx context.Context, resourceGro 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", "ListConfigurationsSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "ListContinuousWebJobs", err.Error()) } - result.fn = client.listConfigurationsSlotNextResults - req, err := client.ListConfigurationsSlotPreparer(ctx, resourceGroupName, name, slot) + result.fn = client.listContinuousWebJobsNextResults + req, err := client.ListContinuousWebJobsPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationsSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobs", nil, "Failure preparing request") return } - resp, err := client.ListConfigurationsSlotSender(req) + resp, err := client.ListContinuousWebJobsSender(req) if err != nil { - result.scrc.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationsSlot", resp, "Failure sending request") + result.cwjc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobs", resp, "Failure sending request") return } - result.scrc, err = client.ListConfigurationsSlotResponder(resp) + result.cwjc, err = client.ListContinuousWebJobsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationsSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobs", resp, "Failure responding to request") } return } -// ListConfigurationsSlotPreparer prepares the ListConfigurationsSlot request. -func (client AppsClient) ListConfigurationsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// ListContinuousWebJobsPreparer prepares the ListContinuousWebJobs request. +func (client AppsClient) ListContinuousWebJobsPreparer(ctx context.Context, resourceGroupName string, name 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), } @@ -17437,21 +18461,21 @@ func (client AppsClient) ListConfigurationsSlotPreparer(ctx context.Context, res preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListConfigurationsSlotSender sends the ListConfigurationsSlot request. The method will close the +// ListContinuousWebJobsSender sends the ListContinuousWebJobs request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListConfigurationsSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListContinuousWebJobsSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListConfigurationsSlotResponder handles the response to the ListConfigurationsSlot request. The method always +// ListContinuousWebJobsResponder handles the response to the ListContinuousWebJobs request. The method always // closes the http.Response Body. -func (client AppsClient) ListConfigurationsSlotResponder(resp *http.Response) (result SiteConfigResourceCollection, err error) { +func (client AppsClient) ListContinuousWebJobsResponder(resp *http.Response) (result ContinuousWebJobCollection, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -17462,31 +18486,31 @@ func (client AppsClient) ListConfigurationsSlotResponder(resp *http.Response) (r return } -// listConfigurationsSlotNextResults retrieves the next set of results, if any. -func (client AppsClient) listConfigurationsSlotNextResults(ctx context.Context, lastResults SiteConfigResourceCollection) (result SiteConfigResourceCollection, err error) { - req, err := lastResults.siteConfigResourceCollectionPreparer(ctx) +// listContinuousWebJobsNextResults retrieves the next set of results, if any. +func (client AppsClient) listContinuousWebJobsNextResults(ctx context.Context, lastResults ContinuousWebJobCollection) (result ContinuousWebJobCollection, err error) { + req, err := lastResults.continuousWebJobCollectionPreparer(ctx) if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationsSlotNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listContinuousWebJobsNextResults", nil, "Failure preparing next results request") } if req == nil { return } - resp, err := client.ListConfigurationsSlotSender(req) + resp, err := client.ListContinuousWebJobsSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationsSlotNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listContinuousWebJobsNextResults", resp, "Failure sending next results request") } - result, err = client.ListConfigurationsSlotResponder(resp) + result, err = client.ListContinuousWebJobsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationsSlotNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "listContinuousWebJobsNextResults", resp, "Failure responding to next results request") } return } -// ListConfigurationsSlotComplete enumerates all values, automatically crossing page boundaries as required. -func (client AppsClient) ListConfigurationsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteConfigResourceCollectionIterator, err error) { +// ListContinuousWebJobsComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppsClient) ListContinuousWebJobsComplete(ctx context.Context, resourceGroupName string, name string) (result ContinuousWebJobCollectionIterator, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationsSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListContinuousWebJobs") defer func() { sc := -1 if result.Response().Response.Response != nil { @@ -17495,21 +18519,23 @@ func (client AppsClient) ListConfigurationsSlotComplete(ctx context.Context, res tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListConfigurationsSlot(ctx, resourceGroupName, name, slot) + result.page, err = client.ListContinuousWebJobs(ctx, resourceGroupName, name) return } -// ListConnectionStrings description for Gets the connection strings of an app. +// ListContinuousWebJobsSlot description for List continuous web jobs for an app, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -func (client AppsClient) ListConnectionStrings(ctx context.Context, resourceGroupName string, name string) (result ConnectionStringDictionary, err error) { +// name - site name. +// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the +// production slot. +func (client AppsClient) ListContinuousWebJobsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result ContinuousWebJobCollectionPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConnectionStrings") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListContinuousWebJobsSlot") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.cwjc.Response.Response != nil { + sc = result.cwjc.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -17519,35 +18545,37 @@ func (client AppsClient) ListConnectionStrings(ctx context.Context, resourceGrou 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", "ListConnectionStrings", err.Error()) + return result, validation.NewError("web.AppsClient", "ListContinuousWebJobsSlot", err.Error()) } - req, err := client.ListConnectionStringsPreparer(ctx, resourceGroupName, name) + result.fn = client.listContinuousWebJobsSlotNextResults + req, err := client.ListContinuousWebJobsSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConnectionStrings", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobsSlot", nil, "Failure preparing request") return } - resp, err := client.ListConnectionStringsSender(req) + resp, err := client.ListContinuousWebJobsSlotSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConnectionStrings", resp, "Failure sending request") + result.cwjc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobsSlot", resp, "Failure sending request") return } - result, err = client.ListConnectionStringsResponder(resp) + result.cwjc, err = client.ListContinuousWebJobsSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConnectionStrings", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobsSlot", resp, "Failure responding to request") } return } -// ListConnectionStringsPreparer prepares the ListConnectionStrings request. -func (client AppsClient) ListConnectionStringsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// ListContinuousWebJobsSlotPreparer prepares the ListContinuousWebJobsSlot request. +func (client AppsClient) ListContinuousWebJobsSlotPreparer(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), } @@ -17557,23 +18585,23 @@ func (client AppsClient) ListConnectionStringsPreparer(ctx context.Context, reso } preparer := autorest.CreatePreparer( - autorest.AsPost(), + autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListConnectionStringsSender sends the ListConnectionStrings request. The method will close the +// ListContinuousWebJobsSlotSender sends the ListContinuousWebJobsSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListConnectionStringsSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListContinuousWebJobsSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListConnectionStringsResponder handles the response to the ListConnectionStrings request. The method always +// ListContinuousWebJobsSlotResponder handles the response to the ListContinuousWebJobsSlot request. The method always // closes the http.Response Body. -func (client AppsClient) ListConnectionStringsResponder(resp *http.Response) (result ConnectionStringDictionary, err error) { +func (client AppsClient) ListContinuousWebJobsSlotResponder(resp *http.Response) (result ContinuousWebJobCollection, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -17584,15 +18612,52 @@ func (client AppsClient) ListConnectionStringsResponder(resp *http.Response) (re return } -// ListConnectionStringsSlot description for Gets the connection strings of an app. +// listContinuousWebJobsSlotNextResults retrieves the next set of results, if any. +func (client AppsClient) listContinuousWebJobsSlotNextResults(ctx context.Context, lastResults ContinuousWebJobCollection) (result ContinuousWebJobCollection, err error) { + req, err := lastResults.continuousWebJobCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listContinuousWebJobsSlotNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListContinuousWebJobsSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listContinuousWebJobsSlotNextResults", resp, "Failure sending next results request") + } + result, err = client.ListContinuousWebJobsSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "listContinuousWebJobsSlotNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListContinuousWebJobsSlotComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppsClient) ListContinuousWebJobsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result ContinuousWebJobCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListContinuousWebJobsSlot") + 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.ListContinuousWebJobsSlot(ctx, resourceGroupName, name, slot) + return +} + +// ListDeploymentLog description for List deployment log for specific deployment for an app, or a deployment slot. // 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 get the connection settings for -// the production slot. -func (client AppsClient) ListConnectionStringsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result ConnectionStringDictionary, err error) { +// ID - the ID of a specific deployment. This is the value of the name property in the JSON response from "GET +// /api/sites/{siteName}/deployments". +func (client AppsClient) ListDeploymentLog(ctx context.Context, resourceGroupName string, name string, ID string) (result Deployment, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConnectionStringsSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDeploymentLog") defer func() { sc := -1 if result.Response.Response != nil { @@ -17606,36 +18671,36 @@ func (client AppsClient) ListConnectionStringsSlot(ctx context.Context, resource 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", "ListConnectionStringsSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "ListDeploymentLog", err.Error()) } - req, err := client.ListConnectionStringsSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.ListDeploymentLogPreparer(ctx, resourceGroupName, name, ID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConnectionStringsSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentLog", nil, "Failure preparing request") return } - resp, err := client.ListConnectionStringsSlotSender(req) + resp, err := client.ListDeploymentLogSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConnectionStringsSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentLog", resp, "Failure sending request") return } - result, err = client.ListConnectionStringsSlotResponder(resp) + result, err = client.ListDeploymentLogResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConnectionStringsSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentLog", resp, "Failure responding to request") } return } -// ListConnectionStringsSlotPreparer prepares the ListConnectionStringsSlot request. -func (client AppsClient) ListConnectionStringsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// ListDeploymentLogPreparer prepares the ListDeploymentLog request. +func (client AppsClient) ListDeploymentLogPreparer(ctx context.Context, resourceGroupName string, name string, ID string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "id": autorest.Encode("path", ID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -17645,23 +18710,23 @@ func (client AppsClient) ListConnectionStringsSlotPreparer(ctx context.Context, } preparer := autorest.CreatePreparer( - autorest.AsPost(), + autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListConnectionStringsSlotSender sends the ListConnectionStringsSlot request. The method will close the +// ListDeploymentLogSender sends the ListDeploymentLog request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListConnectionStringsSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListDeploymentLogSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListConnectionStringsSlotResponder handles the response to the ListConnectionStringsSlot request. The method always +// ListDeploymentLogResponder handles the response to the ListDeploymentLog request. The method always // closes the http.Response Body. -func (client AppsClient) ListConnectionStringsSlotResponder(resp *http.Response) (result ConnectionStringDictionary, err error) { +func (client AppsClient) ListDeploymentLogResponder(resp *http.Response) (result Deployment, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -17672,17 +18737,21 @@ func (client AppsClient) ListConnectionStringsSlotResponder(resp *http.Response) return } -// ListContinuousWebJobs description for List continuous web jobs for an app, or a deployment slot. +// ListDeploymentLogSlot description for List deployment log for specific deployment for an app, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -func (client AppsClient) ListContinuousWebJobs(ctx context.Context, resourceGroupName string, name string) (result ContinuousWebJobCollectionPage, err error) { +// name - name of the app. +// ID - the ID of a specific deployment. This is the value of the name property in the JSON response from "GET +// /api/sites/{siteName}/deployments". +// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the +// production slot. +func (client AppsClient) ListDeploymentLogSlot(ctx context.Context, resourceGroupName string, name string, ID string, slot string) (result Deployment, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListContinuousWebJobs") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDeploymentLogSlot") defer func() { sc := -1 - if result.cwjc.Response.Response != nil { - sc = result.cwjc.Response.Response.StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -17692,36 +18761,37 @@ func (client AppsClient) ListContinuousWebJobs(ctx context.Context, resourceGrou 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", "ListContinuousWebJobs", err.Error()) + return result, validation.NewError("web.AppsClient", "ListDeploymentLogSlot", err.Error()) } - result.fn = client.listContinuousWebJobsNextResults - req, err := client.ListContinuousWebJobsPreparer(ctx, resourceGroupName, name) + req, err := client.ListDeploymentLogSlotPreparer(ctx, resourceGroupName, name, ID, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobs", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentLogSlot", nil, "Failure preparing request") return } - resp, err := client.ListContinuousWebJobsSender(req) + resp, err := client.ListDeploymentLogSlotSender(req) if err != nil { - result.cwjc.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobs", resp, "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentLogSlot", resp, "Failure sending request") return } - result.cwjc, err = client.ListContinuousWebJobsResponder(resp) + result, err = client.ListDeploymentLogSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobs", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentLogSlot", resp, "Failure responding to request") } return } -// ListContinuousWebJobsPreparer prepares the ListContinuousWebJobs request. -func (client AppsClient) ListContinuousWebJobsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// ListDeploymentLogSlotPreparer prepares the ListDeploymentLogSlot request. +func (client AppsClient) ListDeploymentLogSlotPreparer(ctx context.Context, resourceGroupName string, name string, ID string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "id": autorest.Encode("path", ID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -17733,21 +18803,21 @@ func (client AppsClient) ListContinuousWebJobsPreparer(ctx context.Context, reso preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListContinuousWebJobsSender sends the ListContinuousWebJobs request. The method will close the +// ListDeploymentLogSlotSender sends the ListDeploymentLogSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListContinuousWebJobsSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListDeploymentLogSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListContinuousWebJobsResponder handles the response to the ListContinuousWebJobs request. The method always +// ListDeploymentLogSlotResponder handles the response to the ListDeploymentLogSlot request. The method always // closes the http.Response Body. -func (client AppsClient) ListContinuousWebJobsResponder(resp *http.Response) (result ContinuousWebJobCollection, err error) { +func (client AppsClient) ListDeploymentLogSlotResponder(resp *http.Response) (result Deployment, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -17758,56 +18828,17 @@ func (client AppsClient) ListContinuousWebJobsResponder(resp *http.Response) (re return } -// listContinuousWebJobsNextResults retrieves the next set of results, if any. -func (client AppsClient) listContinuousWebJobsNextResults(ctx context.Context, lastResults ContinuousWebJobCollection) (result ContinuousWebJobCollection, err error) { - req, err := lastResults.continuousWebJobCollectionPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listContinuousWebJobsNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListContinuousWebJobsSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listContinuousWebJobsNextResults", resp, "Failure sending next results request") - } - result, err = client.ListContinuousWebJobsResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "listContinuousWebJobsNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListContinuousWebJobsComplete enumerates all values, automatically crossing page boundaries as required. -func (client AppsClient) ListContinuousWebJobsComplete(ctx context.Context, resourceGroupName string, name string) (result ContinuousWebJobCollectionIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListContinuousWebJobs") - 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.ListContinuousWebJobs(ctx, resourceGroupName, name) - return -} - -// ListContinuousWebJobsSlot description for List continuous web jobs for an app, or a deployment slot. +// ListDeployments description for List deployments for an app, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the -// production slot. -func (client AppsClient) ListContinuousWebJobsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result ContinuousWebJobCollectionPage, err error) { +// name - name of the app. +func (client AppsClient) ListDeployments(ctx context.Context, resourceGroupName string, name string) (result DeploymentCollectionPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListContinuousWebJobsSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDeployments") defer func() { sc := -1 - if result.cwjc.Response.Response != nil { - sc = result.cwjc.Response.Response.StatusCode + if result.dc.Response.Response != nil { + sc = result.dc.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -17817,37 +18848,36 @@ func (client AppsClient) ListContinuousWebJobsSlot(ctx context.Context, resource 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", "ListContinuousWebJobsSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "ListDeployments", err.Error()) } - result.fn = client.listContinuousWebJobsSlotNextResults - req, err := client.ListContinuousWebJobsSlotPreparer(ctx, resourceGroupName, name, slot) + result.fn = client.listDeploymentsNextResults + req, err := client.ListDeploymentsPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobsSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeployments", nil, "Failure preparing request") return } - resp, err := client.ListContinuousWebJobsSlotSender(req) + resp, err := client.ListDeploymentsSender(req) if err != nil { - result.cwjc.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobsSlot", resp, "Failure sending request") + result.dc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeployments", resp, "Failure sending request") return } - result.cwjc, err = client.ListContinuousWebJobsSlotResponder(resp) + result.dc, err = client.ListDeploymentsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobsSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeployments", resp, "Failure responding to request") } return } -// ListContinuousWebJobsSlotPreparer prepares the ListContinuousWebJobsSlot request. -func (client AppsClient) ListContinuousWebJobsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// ListDeploymentsPreparer prepares the ListDeployments request. +func (client AppsClient) ListDeploymentsPreparer(ctx context.Context, resourceGroupName string, name 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), } @@ -17859,21 +18889,21 @@ func (client AppsClient) ListContinuousWebJobsSlotPreparer(ctx context.Context, preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListContinuousWebJobsSlotSender sends the ListContinuousWebJobsSlot request. The method will close the +// ListDeploymentsSender sends the ListDeployments request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListContinuousWebJobsSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListDeploymentsSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListContinuousWebJobsSlotResponder handles the response to the ListContinuousWebJobsSlot request. The method always +// ListDeploymentsResponder handles the response to the ListDeployments request. The method always // closes the http.Response Body. -func (client AppsClient) ListContinuousWebJobsSlotResponder(resp *http.Response) (result ContinuousWebJobCollection, err error) { +func (client AppsClient) ListDeploymentsResponder(resp *http.Response) (result DeploymentCollection, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -17884,31 +18914,31 @@ func (client AppsClient) ListContinuousWebJobsSlotResponder(resp *http.Response) return } -// listContinuousWebJobsSlotNextResults retrieves the next set of results, if any. -func (client AppsClient) listContinuousWebJobsSlotNextResults(ctx context.Context, lastResults ContinuousWebJobCollection) (result ContinuousWebJobCollection, err error) { - req, err := lastResults.continuousWebJobCollectionPreparer(ctx) +// listDeploymentsNextResults retrieves the next set of results, if any. +func (client AppsClient) listDeploymentsNextResults(ctx context.Context, lastResults DeploymentCollection) (result DeploymentCollection, err error) { + req, err := lastResults.deploymentCollectionPreparer(ctx) if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listContinuousWebJobsSlotNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDeploymentsNextResults", nil, "Failure preparing next results request") } if req == nil { return } - resp, err := client.ListContinuousWebJobsSlotSender(req) + resp, err := client.ListDeploymentsSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listContinuousWebJobsSlotNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDeploymentsNextResults", resp, "Failure sending next results request") } - result, err = client.ListContinuousWebJobsSlotResponder(resp) + result, err = client.ListDeploymentsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "listContinuousWebJobsSlotNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "listDeploymentsNextResults", resp, "Failure responding to next results request") } return } -// ListContinuousWebJobsSlotComplete enumerates all values, automatically crossing page boundaries as required. -func (client AppsClient) ListContinuousWebJobsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result ContinuousWebJobCollectionIterator, err error) { +// ListDeploymentsComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppsClient) ListDeploymentsComplete(ctx context.Context, resourceGroupName string, name string) (result DeploymentCollectionIterator, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListContinuousWebJobsSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDeployments") defer func() { sc := -1 if result.Response().Response.Response != nil { @@ -17917,23 +18947,23 @@ func (client AppsClient) ListContinuousWebJobsSlotComplete(ctx context.Context, tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListContinuousWebJobsSlot(ctx, resourceGroupName, name, slot) + result.page, err = client.ListDeployments(ctx, resourceGroupName, name) return } -// ListDeploymentLog description for List deployment log for specific deployment for an app, or a deployment slot. +// ListDeploymentsSlot description for List deployments for an app, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// ID - the ID of a specific deployment. This is the value of the name property in the JSON response from "GET -// /api/sites/{siteName}/deployments". -func (client AppsClient) ListDeploymentLog(ctx context.Context, resourceGroupName string, name string, ID string) (result Deployment, err error) { +// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the +// production slot. +func (client AppsClient) ListDeploymentsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result DeploymentCollectionPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDeploymentLog") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDeploymentsSlot") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.dc.Response.Response != nil { + sc = result.dc.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -17943,36 +18973,37 @@ func (client AppsClient) ListDeploymentLog(ctx context.Context, resourceGroupNam 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", "ListDeploymentLog", err.Error()) + return result, validation.NewError("web.AppsClient", "ListDeploymentsSlot", err.Error()) } - req, err := client.ListDeploymentLogPreparer(ctx, resourceGroupName, name, ID) + result.fn = client.listDeploymentsSlotNextResults + req, err := client.ListDeploymentsSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentLog", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentsSlot", nil, "Failure preparing request") return } - resp, err := client.ListDeploymentLogSender(req) + resp, err := client.ListDeploymentsSlotSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentLog", resp, "Failure sending request") + result.dc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentsSlot", resp, "Failure sending request") return } - result, err = client.ListDeploymentLogResponder(resp) + result.dc, err = client.ListDeploymentsSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentLog", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentsSlot", resp, "Failure responding to request") } return } -// ListDeploymentLogPreparer prepares the ListDeploymentLog request. -func (client AppsClient) ListDeploymentLogPreparer(ctx context.Context, resourceGroupName string, name string, ID string) (*http.Request, error) { +// ListDeploymentsSlotPreparer prepares the ListDeploymentsSlot request. +func (client AppsClient) ListDeploymentsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "id": autorest.Encode("path", ID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -17984,21 +19015,21 @@ func (client AppsClient) ListDeploymentLogPreparer(ctx context.Context, resource preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListDeploymentLogSender sends the ListDeploymentLog request. The method will close the +// ListDeploymentsSlotSender sends the ListDeploymentsSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListDeploymentLogSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListDeploymentsSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListDeploymentLogResponder handles the response to the ListDeploymentLog request. The method always +// ListDeploymentsSlotResponder handles the response to the ListDeploymentsSlot request. The method always // closes the http.Response Body. -func (client AppsClient) ListDeploymentLogResponder(resp *http.Response) (result Deployment, err error) { +func (client AppsClient) ListDeploymentsSlotResponder(resp *http.Response) (result DeploymentCollection, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -18009,21 +19040,54 @@ func (client AppsClient) ListDeploymentLogResponder(resp *http.Response) (result return } -// ListDeploymentLogSlot description for List deployment log for specific deployment for an app, or a deployment slot. +// listDeploymentsSlotNextResults retrieves the next set of results, if any. +func (client AppsClient) listDeploymentsSlotNextResults(ctx context.Context, lastResults DeploymentCollection) (result DeploymentCollection, err error) { + req, err := lastResults.deploymentCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDeploymentsSlotNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListDeploymentsSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDeploymentsSlotNextResults", resp, "Failure sending next results request") + } + result, err = client.ListDeploymentsSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "listDeploymentsSlotNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListDeploymentsSlotComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppsClient) ListDeploymentsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result DeploymentCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDeploymentsSlot") + 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.ListDeploymentsSlot(ctx, resourceGroupName, name, slot) + return +} + +// ListDomainOwnershipIdentifiers description for Lists ownership identifiers for domain associated with web app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -// ID - the ID of a specific deployment. This is the value of the name property in the JSON response from "GET -// /api/sites/{siteName}/deployments". -// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the -// production slot. -func (client AppsClient) ListDeploymentLogSlot(ctx context.Context, resourceGroupName string, name string, ID string, slot string) (result Deployment, err error) { +func (client AppsClient) ListDomainOwnershipIdentifiers(ctx context.Context, resourceGroupName string, name string) (result IdentifierCollectionPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDeploymentLogSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDomainOwnershipIdentifiers") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.ic.Response.Response != nil { + sc = result.ic.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -18033,37 +19097,36 @@ func (client AppsClient) ListDeploymentLogSlot(ctx context.Context, resourceGrou 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", "ListDeploymentLogSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "ListDomainOwnershipIdentifiers", err.Error()) } - req, err := client.ListDeploymentLogSlotPreparer(ctx, resourceGroupName, name, ID, slot) + result.fn = client.listDomainOwnershipIdentifiersNextResults + req, err := client.ListDomainOwnershipIdentifiersPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentLogSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDomainOwnershipIdentifiers", nil, "Failure preparing request") return } - resp, err := client.ListDeploymentLogSlotSender(req) + resp, err := client.ListDomainOwnershipIdentifiersSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentLogSlot", resp, "Failure sending request") + result.ic.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDomainOwnershipIdentifiers", resp, "Failure sending request") return } - result, err = client.ListDeploymentLogSlotResponder(resp) + result.ic, err = client.ListDomainOwnershipIdentifiersResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentLogSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDomainOwnershipIdentifiers", resp, "Failure responding to request") } return } -// ListDeploymentLogSlotPreparer prepares the ListDeploymentLogSlot request. -func (client AppsClient) ListDeploymentLogSlotPreparer(ctx context.Context, resourceGroupName string, name string, ID string, slot string) (*http.Request, error) { +// ListDomainOwnershipIdentifiersPreparer prepares the ListDomainOwnershipIdentifiers request. +func (client AppsClient) ListDomainOwnershipIdentifiersPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "id": autorest.Encode("path", ID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -18075,21 +19138,21 @@ func (client AppsClient) ListDeploymentLogSlotPreparer(ctx context.Context, reso preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListDeploymentLogSlotSender sends the ListDeploymentLogSlot request. The method will close the +// ListDomainOwnershipIdentifiersSender sends the ListDomainOwnershipIdentifiers request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListDeploymentLogSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListDomainOwnershipIdentifiersSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListDeploymentLogSlotResponder handles the response to the ListDeploymentLogSlot request. The method always +// ListDomainOwnershipIdentifiersResponder handles the response to the ListDomainOwnershipIdentifiers request. The method always // closes the http.Response Body. -func (client AppsClient) ListDeploymentLogSlotResponder(resp *http.Response) (result Deployment, err error) { +func (client AppsClient) ListDomainOwnershipIdentifiersResponder(resp *http.Response) (result IdentifierCollection, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -18100,17 +19163,56 @@ func (client AppsClient) ListDeploymentLogSlotResponder(resp *http.Response) (re return } -// ListDeployments description for List deployments for an app, or a deployment slot. +// listDomainOwnershipIdentifiersNextResults retrieves the next set of results, if any. +func (client AppsClient) listDomainOwnershipIdentifiersNextResults(ctx context.Context, lastResults IdentifierCollection) (result IdentifierCollection, err error) { + req, err := lastResults.identifierCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDomainOwnershipIdentifiersNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListDomainOwnershipIdentifiersSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDomainOwnershipIdentifiersNextResults", resp, "Failure sending next results request") + } + result, err = client.ListDomainOwnershipIdentifiersResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "listDomainOwnershipIdentifiersNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListDomainOwnershipIdentifiersComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppsClient) ListDomainOwnershipIdentifiersComplete(ctx context.Context, resourceGroupName string, name string) (result IdentifierCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDomainOwnershipIdentifiers") + 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.ListDomainOwnershipIdentifiers(ctx, resourceGroupName, name) + return +} + +// ListDomainOwnershipIdentifiersSlot description for Lists ownership identifiers for domain associated with web app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -func (client AppsClient) ListDeployments(ctx context.Context, resourceGroupName string, name string) (result DeploymentCollectionPage, err error) { +// slot - name of the deployment slot. If a slot is not specified, the API will delete the binding for the +// production slot. +func (client AppsClient) ListDomainOwnershipIdentifiersSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result IdentifierCollectionPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDeployments") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDomainOwnershipIdentifiersSlot") defer func() { sc := -1 - if result.dc.Response.Response != nil { - sc = result.dc.Response.Response.StatusCode + if result.ic.Response.Response != nil { + sc = result.ic.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -18120,36 +19222,37 @@ func (client AppsClient) ListDeployments(ctx context.Context, 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", "ListDeployments", err.Error()) + return result, validation.NewError("web.AppsClient", "ListDomainOwnershipIdentifiersSlot", err.Error()) } - result.fn = client.listDeploymentsNextResults - req, err := client.ListDeploymentsPreparer(ctx, resourceGroupName, name) + result.fn = client.listDomainOwnershipIdentifiersSlotNextResults + req, err := client.ListDomainOwnershipIdentifiersSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeployments", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDomainOwnershipIdentifiersSlot", nil, "Failure preparing request") return } - resp, err := client.ListDeploymentsSender(req) + resp, err := client.ListDomainOwnershipIdentifiersSlotSender(req) if err != nil { - result.dc.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeployments", resp, "Failure sending request") + result.ic.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDomainOwnershipIdentifiersSlot", resp, "Failure sending request") return } - result.dc, err = client.ListDeploymentsResponder(resp) + result.ic, err = client.ListDomainOwnershipIdentifiersSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeployments", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDomainOwnershipIdentifiersSlot", resp, "Failure responding to request") } return } -// ListDeploymentsPreparer prepares the ListDeployments request. -func (client AppsClient) ListDeploymentsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// ListDomainOwnershipIdentifiersSlotPreparer prepares the ListDomainOwnershipIdentifiersSlot request. +func (client AppsClient) ListDomainOwnershipIdentifiersSlotPreparer(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), } @@ -18161,21 +19264,21 @@ func (client AppsClient) ListDeploymentsPreparer(ctx context.Context, resourceGr preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListDeploymentsSender sends the ListDeployments request. The method will close the +// ListDomainOwnershipIdentifiersSlotSender sends the ListDomainOwnershipIdentifiersSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListDeploymentsSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListDomainOwnershipIdentifiersSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListDeploymentsResponder handles the response to the ListDeployments request. The method always +// ListDomainOwnershipIdentifiersSlotResponder handles the response to the ListDomainOwnershipIdentifiersSlot request. The method always // closes the http.Response Body. -func (client AppsClient) ListDeploymentsResponder(resp *http.Response) (result DeploymentCollection, err error) { +func (client AppsClient) ListDomainOwnershipIdentifiersSlotResponder(resp *http.Response) (result IdentifierCollection, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -18186,31 +19289,31 @@ func (client AppsClient) ListDeploymentsResponder(resp *http.Response) (result D return } -// listDeploymentsNextResults retrieves the next set of results, if any. -func (client AppsClient) listDeploymentsNextResults(ctx context.Context, lastResults DeploymentCollection) (result DeploymentCollection, err error) { - req, err := lastResults.deploymentCollectionPreparer(ctx) +// listDomainOwnershipIdentifiersSlotNextResults retrieves the next set of results, if any. +func (client AppsClient) listDomainOwnershipIdentifiersSlotNextResults(ctx context.Context, lastResults IdentifierCollection) (result IdentifierCollection, err error) { + req, err := lastResults.identifierCollectionPreparer(ctx) if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDeploymentsNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDomainOwnershipIdentifiersSlotNextResults", nil, "Failure preparing next results request") } if req == nil { return } - resp, err := client.ListDeploymentsSender(req) + resp, err := client.ListDomainOwnershipIdentifiersSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDeploymentsNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDomainOwnershipIdentifiersSlotNextResults", resp, "Failure sending next results request") } - result, err = client.ListDeploymentsResponder(resp) + result, err = client.ListDomainOwnershipIdentifiersSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "listDeploymentsNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "listDomainOwnershipIdentifiersSlotNextResults", resp, "Failure responding to next results request") } return } -// ListDeploymentsComplete enumerates all values, automatically crossing page boundaries as required. -func (client AppsClient) ListDeploymentsComplete(ctx context.Context, resourceGroupName string, name string) (result DeploymentCollectionIterator, err error) { +// ListDomainOwnershipIdentifiersSlotComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppsClient) ListDomainOwnershipIdentifiersSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result IdentifierCollectionIterator, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDeployments") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDomainOwnershipIdentifiersSlot") defer func() { sc := -1 if result.Response().Response.Response != nil { @@ -18219,23 +19322,22 @@ func (client AppsClient) ListDeploymentsComplete(ctx context.Context, resourceGr tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListDeployments(ctx, resourceGroupName, name) + result.page, err = client.ListDomainOwnershipIdentifiersSlot(ctx, resourceGroupName, name, slot) return } -// ListDeploymentsSlot description for List deployments for an app, or a deployment slot. +// ListFunctionKeys description for Get function keys for a function in a web site, or a deployment slot. // 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 returns deployments for the -// production slot. -func (client AppsClient) ListDeploymentsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result DeploymentCollectionPage, err error) { +// name - site name. +// functionName - function name. +func (client AppsClient) ListFunctionKeys(ctx context.Context, resourceGroupName string, name string, functionName string) (result StringDictionary, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDeploymentsSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListFunctionKeys") defer func() { sc := -1 - if result.dc.Response.Response != nil { - sc = result.dc.Response.Response.StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -18245,37 +19347,36 @@ func (client AppsClient) ListDeploymentsSlot(ctx context.Context, resourceGroupN 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", "ListDeploymentsSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "ListFunctionKeys", err.Error()) } - result.fn = client.listDeploymentsSlotNextResults - req, err := client.ListDeploymentsSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.ListFunctionKeysPreparer(ctx, resourceGroupName, name, functionName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentsSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionKeys", nil, "Failure preparing request") return } - resp, err := client.ListDeploymentsSlotSender(req) + resp, err := client.ListFunctionKeysSender(req) if err != nil { - result.dc.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentsSlot", resp, "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionKeys", resp, "Failure sending request") return } - result.dc, err = client.ListDeploymentsSlotResponder(resp) + result, err = client.ListFunctionKeysResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentsSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionKeys", resp, "Failure responding to request") } return } -// ListDeploymentsSlotPreparer prepares the ListDeploymentsSlot request. -func (client AppsClient) ListDeploymentsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// ListFunctionKeysPreparer prepares the ListFunctionKeys request. +func (client AppsClient) ListFunctionKeysPreparer(ctx context.Context, resourceGroupName string, name string, functionName string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "functionName": autorest.Encode("path", functionName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -18285,23 +19386,23 @@ func (client AppsClient) ListDeploymentsSlotPreparer(ctx context.Context, resour } preparer := autorest.CreatePreparer( - autorest.AsGet(), + autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListDeploymentsSlotSender sends the ListDeploymentsSlot request. The method will close the +// ListFunctionKeysSender sends the ListFunctionKeys request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListDeploymentsSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListFunctionKeysSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListDeploymentsSlotResponder handles the response to the ListDeploymentsSlot request. The method always +// ListFunctionKeysResponder handles the response to the ListFunctionKeys request. The method always // closes the http.Response Body. -func (client AppsClient) ListDeploymentsSlotResponder(resp *http.Response) (result DeploymentCollection, err error) { +func (client AppsClient) ListFunctionKeysResponder(resp *http.Response) (result StringDictionary, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -18312,54 +19413,106 @@ func (client AppsClient) ListDeploymentsSlotResponder(resp *http.Response) (resu return } -// listDeploymentsSlotNextResults retrieves the next set of results, if any. -func (client AppsClient) listDeploymentsSlotNextResults(ctx context.Context, lastResults DeploymentCollection) (result DeploymentCollection, err error) { - req, err := lastResults.deploymentCollectionPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDeploymentsSlotNextResults", nil, "Failure preparing next results request") +// ListFunctionKeysSlot description for Get function keys for a function in a web site, or a deployment slot. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - site name. +// functionName - function name. +// slot - name of the deployment slot. +func (client AppsClient) ListFunctionKeysSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (result StringDictionary, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListFunctionKeysSlot") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() } - if req == nil { + 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", "ListFunctionKeysSlot", err.Error()) + } + + req, err := client.ListFunctionKeysSlotPreparer(ctx, resourceGroupName, name, functionName, slot) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionKeysSlot", nil, "Failure preparing request") return } - resp, err := client.ListDeploymentsSlotSender(req) + + resp, err := client.ListFunctionKeysSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDeploymentsSlotNextResults", resp, "Failure sending next results request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionKeysSlot", resp, "Failure sending request") + return } - result, err = client.ListDeploymentsSlotResponder(resp) + + result, err = client.ListFunctionKeysSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "listDeploymentsSlotNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionKeysSlot", resp, "Failure responding to request") } + return } -// ListDeploymentsSlotComplete enumerates all values, automatically crossing page boundaries as required. -func (client AppsClient) ListDeploymentsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result DeploymentCollectionIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDeploymentsSlot") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() +// ListFunctionKeysSlotPreparer prepares the ListFunctionKeysSlot request. +func (client AppsClient) ListFunctionKeysSlotPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "functionName": autorest.Encode("path", functionName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - result.page, err = client.ListDeploymentsSlot(ctx, resourceGroupName, name, slot) + + const APIVersion = "2019-08-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}/functions/{functionName}/listkeys", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListFunctionKeysSlotSender sends the ListFunctionKeysSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListFunctionKeysSlotSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListFunctionKeysSlotResponder handles the response to the ListFunctionKeysSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) ListFunctionKeysSlotResponder(resp *http.Response) (result StringDictionary, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} return } -// ListDomainOwnershipIdentifiers description for Lists ownership identifiers for domain associated with web app. +// ListFunctions description for List the functions for a web site, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - name of the app. -func (client AppsClient) ListDomainOwnershipIdentifiers(ctx context.Context, resourceGroupName string, name string) (result IdentifierCollectionPage, err error) { +// name - site name. +func (client AppsClient) ListFunctions(ctx context.Context, resourceGroupName string, name string) (result FunctionEnvelopeCollectionPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDomainOwnershipIdentifiers") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListFunctions") defer func() { sc := -1 - if result.ic.Response.Response != nil { - sc = result.ic.Response.Response.StatusCode + if result.fec.Response.Response != nil { + sc = result.fec.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -18369,33 +19522,33 @@ func (client AppsClient) ListDomainOwnershipIdentifiers(ctx context.Context, res 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", "ListDomainOwnershipIdentifiers", err.Error()) + return result, validation.NewError("web.AppsClient", "ListFunctions", err.Error()) } - result.fn = client.listDomainOwnershipIdentifiersNextResults - req, err := client.ListDomainOwnershipIdentifiersPreparer(ctx, resourceGroupName, name) + result.fn = client.listFunctionsNextResults + req, err := client.ListFunctionsPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDomainOwnershipIdentifiers", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctions", nil, "Failure preparing request") return } - resp, err := client.ListDomainOwnershipIdentifiersSender(req) + resp, err := client.ListFunctionsSender(req) if err != nil { - result.ic.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDomainOwnershipIdentifiers", resp, "Failure sending request") + result.fec.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctions", resp, "Failure sending request") return } - result.ic, err = client.ListDomainOwnershipIdentifiersResponder(resp) + result.fec, err = client.ListFunctionsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDomainOwnershipIdentifiers", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctions", resp, "Failure responding to request") } return } -// ListDomainOwnershipIdentifiersPreparer prepares the ListDomainOwnershipIdentifiers request. -func (client AppsClient) ListDomainOwnershipIdentifiersPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// ListFunctionsPreparer prepares the ListFunctions request. +func (client AppsClient) ListFunctionsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -18410,56 +19563,56 @@ func (client AppsClient) ListDomainOwnershipIdentifiersPreparer(ctx context.Cont preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListDomainOwnershipIdentifiersSender sends the ListDomainOwnershipIdentifiers request. The method will close the +// ListFunctionsSender sends the ListFunctions request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListDomainOwnershipIdentifiersSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListFunctionsSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListDomainOwnershipIdentifiersResponder handles the response to the ListDomainOwnershipIdentifiers request. The method always +// ListFunctionsResponder handles the response to the ListFunctions request. The method always // closes the http.Response Body. -func (client AppsClient) ListDomainOwnershipIdentifiersResponder(resp *http.Response) (result IdentifierCollection, err error) { +func (client AppsClient) ListFunctionsResponder(resp *http.Response) (result FunctionEnvelopeCollection, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// listDomainOwnershipIdentifiersNextResults retrieves the next set of results, if any. -func (client AppsClient) listDomainOwnershipIdentifiersNextResults(ctx context.Context, lastResults IdentifierCollection) (result IdentifierCollection, err error) { - req, err := lastResults.identifierCollectionPreparer(ctx) +// listFunctionsNextResults retrieves the next set of results, if any. +func (client AppsClient) listFunctionsNextResults(ctx context.Context, lastResults FunctionEnvelopeCollection) (result FunctionEnvelopeCollection, err error) { + req, err := lastResults.functionEnvelopeCollectionPreparer(ctx) if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDomainOwnershipIdentifiersNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listFunctionsNextResults", nil, "Failure preparing next results request") } if req == nil { return } - resp, err := client.ListDomainOwnershipIdentifiersSender(req) + resp, err := client.ListFunctionsSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDomainOwnershipIdentifiersNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listFunctionsNextResults", resp, "Failure sending next results request") } - result, err = client.ListDomainOwnershipIdentifiersResponder(resp) + result, err = client.ListFunctionsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "listDomainOwnershipIdentifiersNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "listFunctionsNextResults", resp, "Failure responding to next results request") } return } -// ListDomainOwnershipIdentifiersComplete enumerates all values, automatically crossing page boundaries as required. -func (client AppsClient) ListDomainOwnershipIdentifiersComplete(ctx context.Context, resourceGroupName string, name string) (result IdentifierCollectionIterator, err error) { +// ListFunctionsComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppsClient) ListFunctionsComplete(ctx context.Context, resourceGroupName string, name string) (result FunctionEnvelopeCollectionIterator, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDomainOwnershipIdentifiers") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListFunctions") defer func() { sc := -1 if result.Response().Response.Response != nil { @@ -18468,23 +19621,22 @@ func (client AppsClient) ListDomainOwnershipIdentifiersComplete(ctx context.Cont tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.ListDomainOwnershipIdentifiers(ctx, resourceGroupName, name) + result.page, err = client.ListFunctions(ctx, resourceGroupName, name) return } -// ListDomainOwnershipIdentifiersSlot description for Lists ownership identifiers for domain associated with web app. +// ListFunctionSecrets description for Get function secrets for a function in a web site, or a deployment slot. // 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 delete the binding for the -// production slot. -func (client AppsClient) ListDomainOwnershipIdentifiersSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result IdentifierCollectionPage, err error) { +// name - site name. +// functionName - function name. +func (client AppsClient) ListFunctionSecrets(ctx context.Context, resourceGroupName string, name string, functionName string) (result FunctionSecrets, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDomainOwnershipIdentifiersSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListFunctionSecrets") defer func() { sc := -1 - if result.ic.Response.Response != nil { - sc = result.ic.Response.Response.StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -18494,37 +19646,36 @@ func (client AppsClient) ListDomainOwnershipIdentifiersSlot(ctx context.Context, 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", "ListDomainOwnershipIdentifiersSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "ListFunctionSecrets", err.Error()) } - result.fn = client.listDomainOwnershipIdentifiersSlotNextResults - req, err := client.ListDomainOwnershipIdentifiersSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.ListFunctionSecretsPreparer(ctx, resourceGroupName, name, functionName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDomainOwnershipIdentifiersSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionSecrets", nil, "Failure preparing request") return } - resp, err := client.ListDomainOwnershipIdentifiersSlotSender(req) + resp, err := client.ListFunctionSecretsSender(req) if err != nil { - result.ic.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDomainOwnershipIdentifiersSlot", resp, "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionSecrets", resp, "Failure sending request") return } - result.ic, err = client.ListDomainOwnershipIdentifiersSlotResponder(resp) + result, err = client.ListFunctionSecretsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDomainOwnershipIdentifiersSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionSecrets", resp, "Failure responding to request") } return } -// ListDomainOwnershipIdentifiersSlotPreparer prepares the ListDomainOwnershipIdentifiersSlot request. -func (client AppsClient) ListDomainOwnershipIdentifiersSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// ListFunctionSecretsPreparer prepares the ListFunctionSecrets request. +func (client AppsClient) ListFunctionSecretsPreparer(ctx context.Context, resourceGroupName string, name string, functionName string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "functionName": autorest.Encode("path", functionName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -18534,23 +19685,23 @@ func (client AppsClient) ListDomainOwnershipIdentifiersSlotPreparer(ctx context. } preparer := autorest.CreatePreparer( - autorest.AsGet(), + autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListDomainOwnershipIdentifiersSlotSender sends the ListDomainOwnershipIdentifiersSlot request. The method will close the +// ListFunctionSecretsSender sends the ListFunctionSecrets request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListDomainOwnershipIdentifiersSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListFunctionSecretsSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListDomainOwnershipIdentifiersSlotResponder handles the response to the ListDomainOwnershipIdentifiersSlot request. The method always +// ListFunctionSecretsResponder handles the response to the ListFunctionSecrets request. The method always // closes the http.Response Body. -func (client AppsClient) ListDomainOwnershipIdentifiersSlotResponder(resp *http.Response) (result IdentifierCollection, err error) { +func (client AppsClient) ListFunctionSecretsResponder(resp *http.Response) (result FunctionSecrets, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -18561,54 +19712,19 @@ func (client AppsClient) ListDomainOwnershipIdentifiersSlotResponder(resp *http. return } -// listDomainOwnershipIdentifiersSlotNextResults retrieves the next set of results, if any. -func (client AppsClient) listDomainOwnershipIdentifiersSlotNextResults(ctx context.Context, lastResults IdentifierCollection) (result IdentifierCollection, err error) { - req, err := lastResults.identifierCollectionPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDomainOwnershipIdentifiersSlotNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListDomainOwnershipIdentifiersSlotSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDomainOwnershipIdentifiersSlotNextResults", resp, "Failure sending next results request") - } - result, err = client.ListDomainOwnershipIdentifiersSlotResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "listDomainOwnershipIdentifiersSlotNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListDomainOwnershipIdentifiersSlotComplete enumerates all values, automatically crossing page boundaries as required. -func (client AppsClient) ListDomainOwnershipIdentifiersSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result IdentifierCollectionIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDomainOwnershipIdentifiersSlot") - 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.ListDomainOwnershipIdentifiersSlot(ctx, resourceGroupName, name, slot) - return -} - -// ListFunctions description for List the functions for a web site, or a deployment slot. +// ListFunctionSecretsSlot description for Get function secrets for a function in a web site, or a deployment slot. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - site name. -func (client AppsClient) ListFunctions(ctx context.Context, resourceGroupName string, name string) (result FunctionEnvelopeCollectionPage, err error) { +// functionName - function name. +// slot - name of the deployment slot. +func (client AppsClient) ListFunctionSecretsSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (result FunctionSecrets, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListFunctions") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListFunctionSecretsSlot") defer func() { sc := -1 - if result.fec.Response.Response != nil { - sc = result.fec.Response.Response.StatusCode + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -18618,36 +19734,37 @@ func (client AppsClient) ListFunctions(ctx context.Context, resourceGroupName st 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", "ListFunctions", err.Error()) + return result, validation.NewError("web.AppsClient", "ListFunctionSecretsSlot", err.Error()) } - result.fn = client.listFunctionsNextResults - req, err := client.ListFunctionsPreparer(ctx, resourceGroupName, name) + req, err := client.ListFunctionSecretsSlotPreparer(ctx, resourceGroupName, name, functionName, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctions", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionSecretsSlot", nil, "Failure preparing request") return } - resp, err := client.ListFunctionsSender(req) + resp, err := client.ListFunctionSecretsSlotSender(req) if err != nil { - result.fec.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctions", resp, "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionSecretsSlot", resp, "Failure sending request") return } - result.fec, err = client.ListFunctionsResponder(resp) + result, err = client.ListFunctionSecretsSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctions", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionSecretsSlot", resp, "Failure responding to request") } return } -// ListFunctionsPreparer prepares the ListFunctions request. -func (client AppsClient) ListFunctionsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// ListFunctionSecretsSlotPreparer prepares the ListFunctionSecretsSlot request. +func (client AppsClient) ListFunctionSecretsSlotPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "functionName": autorest.Encode("path", functionName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -18657,78 +19774,40 @@ func (client AppsClient) ListFunctionsPreparer(ctx context.Context, resourceGrou } preparer := autorest.CreatePreparer( - autorest.AsGet(), + autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListFunctionsSender sends the ListFunctions request. The method will close the +// ListFunctionSecretsSlotSender sends the ListFunctionSecretsSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListFunctionsSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListFunctionSecretsSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListFunctionsResponder handles the response to the ListFunctions request. The method always -// closes the http.Response Body. -func (client AppsClient) ListFunctionsResponder(resp *http.Response) (result FunctionEnvelopeCollection, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listFunctionsNextResults retrieves the next set of results, if any. -func (client AppsClient) listFunctionsNextResults(ctx context.Context, lastResults FunctionEnvelopeCollection) (result FunctionEnvelopeCollection, err error) { - req, err := lastResults.functionEnvelopeCollectionPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listFunctionsNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListFunctionsSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listFunctionsNextResults", resp, "Failure sending next results request") - } - result, err = client.ListFunctionsResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "listFunctionsNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListFunctionsComplete enumerates all values, automatically crossing page boundaries as required. -func (client AppsClient) ListFunctionsComplete(ctx context.Context, resourceGroupName string, name string) (result FunctionEnvelopeCollectionIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListFunctions") - 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.ListFunctions(ctx, resourceGroupName, name) +// ListFunctionSecretsSlotResponder handles the response to the ListFunctionSecretsSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) ListFunctionSecretsSlotResponder(resp *http.Response) (result FunctionSecrets, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} return } -// ListFunctionSecrets description for Get function secrets for a function in a web site, or a deployment slot. +// ListHostKeys description for Get host secrets for a function app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - site name. -// functionName - function name. -func (client AppsClient) ListFunctionSecrets(ctx context.Context, resourceGroupName string, name string, functionName string) (result FunctionSecrets, err error) { +func (client AppsClient) ListHostKeys(ctx context.Context, resourceGroupName string, name string) (result HostKeys, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListFunctionSecrets") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListHostKeys") defer func() { sc := -1 if result.Response.Response != nil { @@ -18742,34 +19821,33 @@ func (client AppsClient) ListFunctionSecrets(ctx context.Context, resourceGroupN 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", "ListFunctionSecrets", err.Error()) + return result, validation.NewError("web.AppsClient", "ListHostKeys", err.Error()) } - req, err := client.ListFunctionSecretsPreparer(ctx, resourceGroupName, name, functionName) + req, err := client.ListHostKeysPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionSecrets", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHostKeys", nil, "Failure preparing request") return } - resp, err := client.ListFunctionSecretsSender(req) + resp, err := client.ListHostKeysSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionSecrets", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHostKeys", resp, "Failure sending request") return } - result, err = client.ListFunctionSecretsResponder(resp) + result, err = client.ListHostKeysResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionSecrets", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHostKeys", resp, "Failure responding to request") } return } -// ListFunctionSecretsPreparer prepares the ListFunctionSecrets request. -func (client AppsClient) ListFunctionSecretsPreparer(ctx context.Context, resourceGroupName string, name string, functionName string) (*http.Request, error) { +// ListHostKeysPreparer prepares the ListHostKeys request. +func (client AppsClient) ListHostKeysPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "functionName": autorest.Encode("path", functionName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -18783,21 +19861,21 @@ func (client AppsClient) ListFunctionSecretsPreparer(ctx context.Context, resour preparer := autorest.CreatePreparer( autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListFunctionSecretsSender sends the ListFunctionSecrets request. The method will close the +// ListHostKeysSender sends the ListHostKeys request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListFunctionSecretsSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListHostKeysSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListFunctionSecretsResponder handles the response to the ListFunctionSecrets request. The method always +// ListHostKeysResponder handles the response to the ListHostKeys request. The method always // closes the http.Response Body. -func (client AppsClient) ListFunctionSecretsResponder(resp *http.Response) (result FunctionSecrets, err error) { +func (client AppsClient) ListHostKeysResponder(resp *http.Response) (result HostKeys, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -18808,15 +19886,14 @@ func (client AppsClient) ListFunctionSecretsResponder(resp *http.Response) (resu return } -// ListFunctionSecretsSlot description for Get function secrets for a function in a web site, or a deployment slot. +// ListHostKeysSlot description for Get host secrets for a function app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - site name. -// functionName - function name. // slot - name of the deployment slot. -func (client AppsClient) ListFunctionSecretsSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (result FunctionSecrets, err error) { +func (client AppsClient) ListHostKeysSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result HostKeys, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListFunctionSecretsSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListHostKeysSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -18830,34 +19907,33 @@ func (client AppsClient) ListFunctionSecretsSlot(ctx context.Context, resourceGr 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", "ListFunctionSecretsSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "ListHostKeysSlot", err.Error()) } - req, err := client.ListFunctionSecretsSlotPreparer(ctx, resourceGroupName, name, functionName, slot) + req, err := client.ListHostKeysSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionSecretsSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHostKeysSlot", nil, "Failure preparing request") return } - resp, err := client.ListFunctionSecretsSlotSender(req) + resp, err := client.ListHostKeysSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionSecretsSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHostKeysSlot", resp, "Failure sending request") return } - result, err = client.ListFunctionSecretsSlotResponder(resp) + result, err = client.ListHostKeysSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionSecretsSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHostKeysSlot", resp, "Failure responding to request") } return } -// ListFunctionSecretsSlotPreparer prepares the ListFunctionSecretsSlot request. -func (client AppsClient) ListFunctionSecretsSlotPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (*http.Request, error) { +// ListHostKeysSlotPreparer prepares the ListHostKeysSlot request. +func (client AppsClient) ListHostKeysSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "functionName": autorest.Encode("path", functionName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), @@ -18872,21 +19948,21 @@ func (client AppsClient) ListFunctionSecretsSlotPreparer(ctx context.Context, re preparer := autorest.CreatePreparer( autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListFunctionSecretsSlotSender sends the ListFunctionSecretsSlot request. The method will close the +// ListHostKeysSlotSender sends the ListHostKeysSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListFunctionSecretsSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListHostKeysSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListFunctionSecretsSlotResponder handles the response to the ListFunctionSecretsSlot request. The method always +// ListHostKeysSlotResponder handles the response to the ListHostKeysSlot request. The method always // closes the http.Response Body. -func (client AppsClient) ListFunctionSecretsSlotResponder(resp *http.Response) (result FunctionSecrets, err error) { +func (client AppsClient) ListHostKeysSlotResponder(resp *http.Response) (result HostKeys, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -24334,23 +25410,232 @@ func (client AppsClient) ListSnapshotsSlot(ctx context.Context, resourceGroupNam return } - resp, err := client.ListSnapshotsSlotSender(req) + resp, err := client.ListSnapshotsSlotSender(req) + if err != nil { + result.sc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSnapshotsSlot", resp, "Failure sending request") + return + } + + result.sc, err = client.ListSnapshotsSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSnapshotsSlot", resp, "Failure responding to request") + } + + return +} + +// ListSnapshotsSlotPreparer prepares the ListSnapshotsSlot request. +func (client AppsClient) ListSnapshotsSlotPreparer(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 = "2019-08-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.Web/sites/{name}/slots/{slot}/snapshots", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSnapshotsSlotSender sends the ListSnapshotsSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListSnapshotsSlotSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListSnapshotsSlotResponder handles the response to the ListSnapshotsSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) ListSnapshotsSlotResponder(resp *http.Response) (result SnapshotCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listSnapshotsSlotNextResults retrieves the next set of results, if any. +func (client AppsClient) listSnapshotsSlotNextResults(ctx context.Context, lastResults SnapshotCollection) (result SnapshotCollection, err error) { + req, err := lastResults.snapshotCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSnapshotsSlotNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSnapshotsSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSnapshotsSlotNextResults", resp, "Failure sending next results request") + } + result, err = client.ListSnapshotsSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "listSnapshotsSlotNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListSnapshotsSlotComplete enumerates all values, automatically crossing page boundaries as required. +func (client AppsClient) ListSnapshotsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result SnapshotCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSnapshotsSlot") + 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.ListSnapshotsSlot(ctx, resourceGroupName, name, slot) + return +} + +// ListSyncFunctionTriggers description for This is to allow calling via powershell and ARM template. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the app. +func (client AppsClient) ListSyncFunctionTriggers(ctx context.Context, resourceGroupName string, name string) (result FunctionSecrets, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSyncFunctionTriggers") + 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}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "ListSyncFunctionTriggers", err.Error()) + } + + req, err := client.ListSyncFunctionTriggersPreparer(ctx, resourceGroupName, name) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncFunctionTriggers", nil, "Failure preparing request") + return + } + + resp, err := client.ListSyncFunctionTriggersSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncFunctionTriggers", resp, "Failure sending request") + return + } + + result, err = client.ListSyncFunctionTriggersResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncFunctionTriggers", resp, "Failure responding to request") + } + + return +} + +// ListSyncFunctionTriggersPreparer prepares the ListSyncFunctionTriggers request. +func (client AppsClient) ListSyncFunctionTriggersPreparer(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 = "2019-08-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}/listsyncfunctiontriggerstatus", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSyncFunctionTriggersSender sends the ListSyncFunctionTriggers request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListSyncFunctionTriggersSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListSyncFunctionTriggersResponder handles the response to the ListSyncFunctionTriggers request. The method always +// closes the http.Response Body. +func (client AppsClient) ListSyncFunctionTriggersResponder(resp *http.Response) (result FunctionSecrets, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListSyncFunctionTriggersSlot description for This is to allow calling via powershell and ARM template. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the app. +// slot - name of the deployment slot. +func (client AppsClient) ListSyncFunctionTriggersSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result FunctionSecrets, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSyncFunctionTriggersSlot") + 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}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "ListSyncFunctionTriggersSlot", err.Error()) + } + + req, err := client.ListSyncFunctionTriggersSlotPreparer(ctx, resourceGroupName, name, slot) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncFunctionTriggersSlot", nil, "Failure preparing request") + return + } + + resp, err := client.ListSyncFunctionTriggersSlotSender(req) if err != nil { - result.sc.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSnapshotsSlot", resp, "Failure sending request") + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncFunctionTriggersSlot", resp, "Failure sending request") return } - result.sc, err = client.ListSnapshotsSlotResponder(resp) + result, err = client.ListSyncFunctionTriggersSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSnapshotsSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncFunctionTriggersSlot", resp, "Failure responding to request") } return } -// ListSnapshotsSlotPreparer prepares the ListSnapshotsSlot request. -func (client AppsClient) ListSnapshotsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// ListSyncFunctionTriggersSlotPreparer prepares the ListSyncFunctionTriggersSlot request. +func (client AppsClient) ListSyncFunctionTriggersSlotPreparer(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), @@ -24364,23 +25649,23 @@ func (client AppsClient) ListSnapshotsSlotPreparer(ctx context.Context, resource } preparer := autorest.CreatePreparer( - autorest.AsGet(), + autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListSnapshotsSlotSender sends the ListSnapshotsSlot request. The method will close the +// ListSyncFunctionTriggersSlotSender sends the ListSyncFunctionTriggersSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListSnapshotsSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListSyncFunctionTriggersSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListSnapshotsSlotResponder handles the response to the ListSnapshotsSlot request. The method always +// ListSyncFunctionTriggersSlotResponder handles the response to the ListSyncFunctionTriggersSlot request. The method always // closes the http.Response Body. -func (client AppsClient) ListSnapshotsSlotResponder(resp *http.Response) (result SnapshotCollection, err error) { +func (client AppsClient) ListSyncFunctionTriggersSlotResponder(resp *http.Response) (result FunctionSecrets, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -24391,54 +25676,17 @@ func (client AppsClient) ListSnapshotsSlotResponder(resp *http.Response) (result return } -// listSnapshotsSlotNextResults retrieves the next set of results, if any. -func (client AppsClient) listSnapshotsSlotNextResults(ctx context.Context, lastResults SnapshotCollection) (result SnapshotCollection, err error) { - req, err := lastResults.snapshotCollectionPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSnapshotsSlotNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListSnapshotsSlotSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSnapshotsSlotNextResults", resp, "Failure sending next results request") - } - result, err = client.ListSnapshotsSlotResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "listSnapshotsSlotNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListSnapshotsSlotComplete enumerates all values, automatically crossing page boundaries as required. -func (client AppsClient) ListSnapshotsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result SnapshotCollectionIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSnapshotsSlot") - 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.ListSnapshotsSlot(ctx, resourceGroupName, name, slot) - return -} - -// ListSyncFunctionTriggers description for This is to allow calling via powershell and ARM template. +// ListSyncStatus description for This is to allow calling via powershell and ARM template. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. -func (client AppsClient) ListSyncFunctionTriggers(ctx context.Context, resourceGroupName string, name string) (result FunctionSecrets, err error) { +func (client AppsClient) ListSyncStatus(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSyncFunctionTriggers") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSyncStatus") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.Response != nil { + sc = result.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -24448,32 +25696,32 @@ func (client AppsClient) ListSyncFunctionTriggers(ctx context.Context, resourceG 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", "ListSyncFunctionTriggers", err.Error()) + return result, validation.NewError("web.AppsClient", "ListSyncStatus", err.Error()) } - req, err := client.ListSyncFunctionTriggersPreparer(ctx, resourceGroupName, name) + req, err := client.ListSyncStatusPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncFunctionTriggers", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncStatus", nil, "Failure preparing request") return } - resp, err := client.ListSyncFunctionTriggersSender(req) + resp, err := client.ListSyncStatusSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncFunctionTriggers", resp, "Failure sending request") + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncStatus", resp, "Failure sending request") return } - result, err = client.ListSyncFunctionTriggersResponder(resp) + result, err = client.ListSyncStatusResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncFunctionTriggers", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncStatus", resp, "Failure responding to request") } return } -// ListSyncFunctionTriggersPreparer prepares the ListSyncFunctionTriggers request. -func (client AppsClient) ListSyncFunctionTriggersPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { +// ListSyncStatusPreparer prepares the ListSyncStatus request. +func (client AppsClient) ListSyncStatusPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -24488,43 +25736,42 @@ func (client AppsClient) ListSyncFunctionTriggersPreparer(ctx context.Context, r preparer := autorest.CreatePreparer( autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListSyncFunctionTriggersSender sends the ListSyncFunctionTriggers request. The method will close the +// ListSyncStatusSender sends the ListSyncStatus request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListSyncFunctionTriggersSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListSyncStatusSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListSyncFunctionTriggersResponder handles the response to the ListSyncFunctionTriggers request. The method always +// ListSyncStatusResponder handles the response to the ListSyncStatus request. The method always // closes the http.Response Body. -func (client AppsClient) ListSyncFunctionTriggersResponder(resp *http.Response) (result FunctionSecrets, err error) { +func (client AppsClient) ListSyncStatusResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} + result.Response = resp return } -// ListSyncFunctionTriggersSlot description for This is to allow calling via powershell and ARM template. +// ListSyncStatusSlot description for This is to allow calling via powershell and ARM template. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. // slot - name of the deployment slot. -func (client AppsClient) ListSyncFunctionTriggersSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result FunctionSecrets, err error) { +func (client AppsClient) ListSyncStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSyncFunctionTriggersSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSyncStatusSlot") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.Response != nil { + sc = result.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -24534,32 +25781,32 @@ func (client AppsClient) ListSyncFunctionTriggersSlot(ctx context.Context, resou 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", "ListSyncFunctionTriggersSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "ListSyncStatusSlot", err.Error()) } - req, err := client.ListSyncFunctionTriggersSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.ListSyncStatusSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncFunctionTriggersSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncStatusSlot", nil, "Failure preparing request") return } - resp, err := client.ListSyncFunctionTriggersSlotSender(req) + resp, err := client.ListSyncStatusSlotSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncFunctionTriggersSlot", resp, "Failure sending request") + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncStatusSlot", resp, "Failure sending request") return } - result, err = client.ListSyncFunctionTriggersSlotResponder(resp) + result, err = client.ListSyncStatusSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncFunctionTriggersSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncStatusSlot", resp, "Failure responding to request") } return } -// ListSyncFunctionTriggersSlotPreparer prepares the ListSyncFunctionTriggersSlot request. -func (client AppsClient) ListSyncFunctionTriggersSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { +// ListSyncStatusSlotPreparer prepares the ListSyncStatusSlot request. +func (client AppsClient) ListSyncStatusSlotPreparer(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), @@ -24575,28 +25822,27 @@ func (client AppsClient) ListSyncFunctionTriggersSlotPreparer(ctx context.Contex preparer := autorest.CreatePreparer( autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListSyncFunctionTriggersSlotSender sends the ListSyncFunctionTriggersSlot request. The method will close the +// ListSyncStatusSlotSender sends the ListSyncStatusSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListSyncFunctionTriggersSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListSyncStatusSlotSender(req *http.Request) (*http.Response, error) { sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return autorest.SendWithSender(client, req, sd...) } -// ListSyncFunctionTriggersSlotResponder handles the response to the ListSyncFunctionTriggersSlot request. The method always +// ListSyncStatusSlotResponder handles the response to the ListSyncStatusSlot request. The method always // closes the http.Response Body. -func (client AppsClient) ListSyncFunctionTriggersSlotResponder(resp *http.Response) (result FunctionSecrets, err error) { +func (client AppsClient) ListSyncStatusSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} + result.Response = resp return } @@ -29400,7 +30646,177 @@ func (client AppsClient) SwapSlotWithProductionResponder(resp *http.Response) (r return } -// SyncFunctionTriggers description for Syncs function trigger metadata to the scale controller +// SyncFunctions description for Syncs function trigger metadata to the management database +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the app. +func (client AppsClient) SyncFunctions(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.SyncFunctions") + 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}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "SyncFunctions", err.Error()) + } + + req, err := client.SyncFunctionsPreparer(ctx, resourceGroupName, name) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctions", nil, "Failure preparing request") + return + } + + resp, err := client.SyncFunctionsSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctions", resp, "Failure sending request") + return + } + + result, err = client.SyncFunctionsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctions", resp, "Failure responding to request") + } + + return +} + +// SyncFunctionsPreparer prepares the SyncFunctions request. +func (client AppsClient) SyncFunctionsPreparer(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 = "2019-08-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}/host/default/sync", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// SyncFunctionsSender sends the SyncFunctions request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) SyncFunctionsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// SyncFunctionsResponder handles the response to the SyncFunctions request. The method always +// closes the http.Response Body. +func (client AppsClient) SyncFunctionsResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// SyncFunctionsSlot description for Syncs function trigger metadata to the management database +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the app. +// slot - name of the deployment slot. +func (client AppsClient) SyncFunctionsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.SyncFunctionsSlot") + 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}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "SyncFunctionsSlot", err.Error()) + } + + req, err := client.SyncFunctionsSlotPreparer(ctx, resourceGroupName, name, slot) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionsSlot", nil, "Failure preparing request") + return + } + + resp, err := client.SyncFunctionsSlotSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionsSlot", resp, "Failure sending request") + return + } + + result, err = client.SyncFunctionsSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionsSlot", resp, "Failure responding to request") + } + + return +} + +// SyncFunctionsSlotPreparer prepares the SyncFunctionsSlot request. +func (client AppsClient) SyncFunctionsSlotPreparer(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 = "2019-08-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}/host/default/sync", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// SyncFunctionsSlotSender sends the SyncFunctionsSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) SyncFunctionsSlotSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// SyncFunctionsSlotResponder handles the response to the SyncFunctionsSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) SyncFunctionsSlotResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// SyncFunctionTriggers description for Syncs function trigger metadata to the management database // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. @@ -29484,7 +30900,7 @@ func (client AppsClient) SyncFunctionTriggersResponder(resp *http.Response) (res return } -// SyncFunctionTriggersSlot description for Syncs function trigger metadata to the scale controller +// SyncFunctionTriggersSlot description for Syncs function trigger metadata to the management database // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. // name - name of the app. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2019-08-01/web/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2019-08-01/web/models.go index d06b77a42eebe..d11509b0d6456 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2019-08-01/web/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2019-08-01/web/models.go @@ -10903,6 +10903,32 @@ type HostingEnvironmentProfile struct { Type *string `json:"type,omitempty"` } +// HostKeys functions host level keys. +type HostKeys struct { + autorest.Response `json:"-"` + // MasterKey - Secret key. + MasterKey *string `json:"masterKey,omitempty"` + // FunctionKeys - Host level function keys. + FunctionKeys map[string]*string `json:"functionKeys"` + // SystemKeys - System keys. + SystemKeys map[string]*string `json:"systemKeys"` +} + +// MarshalJSON is the custom marshaler for HostKeys. +func (hk HostKeys) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if hk.MasterKey != nil { + objectMap["masterKey"] = hk.MasterKey + } + if hk.FunctionKeys != nil { + objectMap["functionKeys"] = hk.FunctionKeys + } + if hk.SystemKeys != nil { + objectMap["systemKeys"] = hk.SystemKeys + } + return json.Marshal(objectMap) +} + // HostName details of a hostname derived from a domain. type HostName struct { // Name - Name of the hostname. @@ -12346,6 +12372,15 @@ func (j JobProperties) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// KeyInfo function key info. +type KeyInfo struct { + autorest.Response `json:"-"` + // Name - Key name + Name *string `json:"name,omitempty"` + // Value - Key value + Value *string `json:"value,omitempty"` +} + // KeyVaultReferenceCollection web app key vault reference and status ARM resource. type KeyVaultReferenceCollection struct { autorest.Response `json:"-"`