diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 9dc7b82e01ab..5ce8e1746eea 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -10,6 +10,14 @@ jobs: vm.image: 'ubuntu-18.04' go.version: '1.13' GOROOT: '/usr/local/go$(go.version)' + Win_Go112: + vm.image: 'windows-2019' + go.version: '1.12' + GOROOT: 'c:\go$(go.version)' + Win_Go113: + vm.image: 'windows-2019' + go.version: '1.13' + GOROOT: 'c:\go$(go.version)' pool: vmImage: $(vm.image) @@ -28,10 +36,10 @@ jobs: mv !(work) '$(sdkPath)' echo '##vso[task.prependpath]$(GOROOT)/bin' echo '##vso[task.prependpath]$(GOPATH)/bin' + go version displayName: 'Create Go Workspace' - script: | set -e - go version curl -sSL https://raw.githubusercontent.com/golang/dep/master/install.sh | sh dep ensure -v go get -u golang.org/x/lint/golint diff --git a/profiles/2019-03-01/web/mgmt/web/models.go b/profiles/2019-03-01/web/mgmt/web/models.go index 95b1192a9eb0..fd8978007c05 100644 --- a/profiles/2019-03-01/web/mgmt/web/models.go +++ b/profiles/2019-03-01/web/mgmt/web/models.go @@ -887,6 +887,7 @@ type GeoRegionProperties = original.GeoRegionProperties type GlobalCsmSkuDescription = original.GlobalCsmSkuDescription type HTTPLogsConfig = original.HTTPLogsConfig type HandlerMapping = original.HandlerMapping +type HostKeys = original.HostKeys type HostName = original.HostName type HostNameBinding = original.HostNameBinding type HostNameBindingCollection = original.HostNameBindingCollection @@ -921,6 +922,7 @@ type JobCollection = original.JobCollection type JobCollectionIterator = original.JobCollectionIterator type JobCollectionPage = original.JobCollectionPage type JobProperties = original.JobProperties +type KeyInfo = original.KeyInfo type ListCapability = original.ListCapability type ListCertificateEmail = original.ListCertificateEmail type ListCertificateOrderAction = original.ListCertificateOrderAction diff --git a/services/web/mgmt/2018-02-01/web/apps.go b/services/web/mgmt/2018-02-01/web/apps.go index 6a7668705ff9..ed10055f313e 100644 --- a/services/web/mgmt/2018-02-01/web/apps.go +++ b/services/web/mgmt/2018-02-01/web/apps.go @@ -1061,8 +1061,7 @@ func (client AppsClient) CreateFunctionResponder(resp *http.Response) (result Fu // resourceGroupName - name of the resource group to which the resource belongs. // name - site name. // functionName - function name. -// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the -// production slot. +// slot - name of the deployment slot. // functionEnvelope - function details. func (client AppsClient) CreateInstanceFunctionSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string, functionEnvelope FunctionEnvelope) (result AppsCreateInstanceFunctionSlotFuture, err error) { if tracing.IsEnabled() { @@ -1999,15 +1998,16 @@ func (client AppsClient) CreateOrUpdateDomainOwnershipIdentifierSlotResponder(re return } -// CreateOrUpdateHostNameBinding creates a hostname binding for an app. +// CreateOrUpdateFunctionSecret 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 { @@ -2021,34 +2021,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), @@ -2063,43 +2064,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 creates a hostname binding for an app. +// CreateOrUpdateFunctionSecretSlot 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 { @@ -2113,34 +2114,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), @@ -2156,42 +2158,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 creates a new Hybrid Connection using a Service Bus relay. +// CreateOrUpdateHostNameBinding 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 { @@ -2205,36 +2206,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), } @@ -2248,22 +2248,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 +// CreateOrUpdateFunctionSecretResponder handles the response to the CreateOrUpdateFunctionSecret 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(), @@ -2274,17 +2274,17 @@ func (client AppsClient) CreateOrUpdateHybridConnectionResponder(resp *http.Resp return } -// CreateOrUpdateHybridConnectionSlot creates a new Hybrid Connection using a Service Bus relay. +// CreateOrUpdateHostNameBindingSlot 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 { @@ -2298,36 +2298,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), @@ -2342,22 +2341,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 +// CreateOrUpdateFunctionSecretSlotResponder handles the response to the CreateOrUpdateFunctionSecretSlot 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(), @@ -2368,16 +2367,16 @@ func (client AppsClient) CreateOrUpdateHybridConnectionSlotResponder(resp *http. return } -// CreateOrUpdatePublicCertificate creates a hostname binding for an app. +// CreateOrUpdateHostSecret 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 { @@ -2391,37 +2390,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 = "2018-02-01" @@ -2433,44 +2433,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 creates a hostname binding for an app. +// CreateOrUpdateHostSecretSlot 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 { @@ -2484,38 +2483,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 = "2018-02-01" @@ -2527,42 +2527,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 creates a new hybrid connection configuration (PUT), or updates an existing one -// (PATCH). +// CreateOrUpdateHybridConnection 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 { @@ -2576,35 +2576,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), } @@ -2618,22 +2619,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 +// CreateOrUpdateHostNameBindingResponder handles the response to the CreateOrUpdateHostNameBinding 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(), @@ -2644,18 +2645,17 @@ func (client AppsClient) CreateOrUpdateRelayServiceConnectionResponder(resp *htt return } -// CreateOrUpdateRelayServiceConnectionSlot creates a new hybrid connection configuration (PUT), or updates an existing -// one (PATCH). +// CreateOrUpdateHybridConnectionSlot 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 { @@ -2669,35 +2669,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), @@ -2712,22 +2713,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 +// CreateOrUpdateHostNameBindingSlotResponder handles the response to the CreateOrUpdateHostNameBindingSlot 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(), @@ -2738,21 +2739,20 @@ func (client AppsClient) CreateOrUpdateRelayServiceConnectionSlotResponder(resp return } -// CreateOrUpdateSlot creates a new web, mobile, or API app in an existing resource group, or updates an existing app. +// CreateOrUpdatePublicCertificate 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) }() @@ -2761,47 +2761,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.ReservedInstanceCount", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.ReservedInstanceCount", Name: validation.InclusiveMaximum, Rule: int64(10), Chain: nil}, - {Target: "siteEnvelope.SiteProperties.SiteConfig.ReservedInstanceCount", Name: validation.InclusiveMinimum, Rule: 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 = "2018-02-01" @@ -2813,50 +2804,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 +// CreateOrUpdateHostSecretResponder handles the response to the CreateOrUpdateHostSecret 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 updates the source control configuration of an app. +// CreateOrUpdatePublicCertificateSlot 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) }() @@ -2866,30 +2855,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 = "2018-02-01" @@ -2901,52 +2898,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 +// CreateOrUpdateHostSecretSlotResponder handles the response to the CreateOrUpdateHostSecretSlot 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 updates the source control configuration of an app. +// CreateOrUpdateRelayServiceConnection 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) }() @@ -2956,30 +2947,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), } @@ -2992,49 +2989,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 +// CreateOrUpdateHybridConnectionResponder handles the response to the CreateOrUpdateHybridConnection 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 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 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 { @@ -3048,35 +3040,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), } @@ -3089,22 +3083,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 +// CreateOrUpdateHybridConnectionSlotResponder handles the response to the CreateOrUpdateHybridConnectionSlot 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(), @@ -3115,23 +3109,21 @@ func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionResponder(re return } -// CreateOrUpdateSwiftVirtualNetworkConnectionSlot 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 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) }() @@ -3140,33 +3132,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.ReservedInstanceCount", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.ReservedInstanceCount", Name: validation.InclusiveMaximum, Rule: int64(10), Chain: nil}, + {Target: "siteEnvelope.SiteProperties.SiteConfig.ReservedInstanceCount", Name: validation.InclusiveMinimum, Rule: 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), @@ -3183,46 +3184,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 +// CreateOrUpdatePublicCertificateResponder handles the response to the CreateOrUpdatePublicCertificate 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 adds a Virtual Network connection to an app or slot (PUT) or updates the connection -// properties (PATCH). +// CreateOrUpdateSourceControl 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) }() @@ -3232,37 +3237,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 = "2018-02-01" @@ -3274,46 +3272,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 +// CreateOrUpdatePublicCertificateSlotResponder handles the response to the CreateOrUpdatePublicCertificateSlot 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 adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). +// CreateOrUpdateSourceControlSlot 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) }() @@ -3322,42 +3326,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 = "2018-02-01" @@ -3369,44 +3363,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 +// CreateOrUpdateRelayServiceConnectionResponder handles the response to the CreateOrUpdateRelayServiceConnection 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 adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). +// CreateOrUpdateSwiftVirtualNetworkConnection 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 { @@ -3419,43 +3418,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 = "2018-02-01" @@ -3467,22 +3460,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 +// CreateOrUpdateRelayServiceConnectionSlotResponder handles the response to the CreateOrUpdateRelayServiceConnectionSlot 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(), @@ -3493,18 +3486,19 @@ func (client AppsClient) CreateOrUpdateVnetConnectionGatewaySlotResponder(resp * return } -// CreateOrUpdateVnetConnectionSlot adds a Virtual Network connection to an app or slot (PUT) or updates the connection -// properties (PATCH). +// CreateOrUpdateSwiftVirtualNetworkConnectionSlot 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 { @@ -3518,38 +3512,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 = "2018-02-01" @@ -3561,22 +3554,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 +// CreateOrUpdateSlotResponder handles the response to the CreateOrUpdateSlot 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(), @@ -3587,20 +3580,20 @@ func (client AppsClient) CreateOrUpdateVnetConnectionSlotResponder(resp *http.Re return } -// Delete deletes a web, mobile, or API app, or one of the deployment slots. +// CreateOrUpdateVnetConnection 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 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) 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) }() @@ -3610,88 +3603,88 @@ 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 = "2018-02-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 +// CreateOrUpdateSourceControlResponder handles the response to the CreateOrUpdateSourceControl 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 deletes a backup of an app by its ID. +// CreateOrUpdateVnetConnectionGateway 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) }() @@ -3700,38 +3693,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 = "2018-02-01" @@ -3740,43 +3737,51 @@ 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 deletes the backup configuration of an app. +// CreateOrUpdateVnetConnectionGatewaySlot 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) }() @@ -3785,37 +3790,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") + 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 = "2018-02-01" @@ -3824,45 +3835,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 +// CreateOrUpdateSwiftVirtualNetworkConnectionResponder handles the response to the CreateOrUpdateSwiftVirtualNetworkConnection 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 deletes the backup configuration of an app. +// CreateOrUpdateVnetConnectionSlot 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) }() @@ -3872,37 +3889,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 = "2018-02-01" @@ -3911,42 +3929,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 +// CreateOrUpdateSwiftVirtualNetworkConnectionSlotResponder handles the response to the CreateOrUpdateSwiftVirtualNetworkConnectionSlot 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 deletes a backup of an app by its ID. +// Delete 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 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) 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 { @@ -3960,37 +3981,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), } @@ -3998,42 +4017,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 delete a continuous web job by its ID for an app, or a deployment slot. +// DeleteBackup 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 { @@ -4047,37 +4072,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 = "2018-02-01" @@ -4088,40 +4113,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 +// CreateOrUpdateVnetConnectionGatewayResponder handles the response to the CreateOrUpdateVnetConnectionGateway 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 delete a continuous web job by its ID for an app, or a deployment slot. +// DeleteBackupConfiguration 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 { @@ -4135,38 +4157,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 = "2018-02-01" @@ -4177,38 +4197,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 +// CreateOrUpdateVnetConnectionGatewaySlotResponder handles the response to the CreateOrUpdateVnetConnectionGatewaySlot 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 delete a deployment by its ID for an app, or a deployment slot. +// DeleteBackupConfigurationSlot 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 { @@ -4222,36 +4243,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), } @@ -4263,40 +4284,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 +// CreateOrUpdateVnetConnectionSlotResponder handles the response to the CreateOrUpdateVnetConnectionSlot 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 delete a deployment by its ID for an app, or a deployment slot. +// DeleteBackupSlot 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 { @@ -4310,34 +4331,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), @@ -4352,38 +4373,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 +// DeleteResponder handles the response to the Delete 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 deletes a domain ownership identifier for a web app. +// DeleteContinuousWebJob 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 { @@ -4397,37 +4418,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 = "2018-02-01" @@ -4438,21 +4459,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 +// DeleteBackupResponder handles the response to the DeleteBackup 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(), @@ -4462,16 +4483,16 @@ func (client AppsClient) DeleteDomainOwnershipIdentifierResponder(resp *http.Res return } -// DeleteDomainOwnershipIdentifierSlot deletes a domain ownership identifier for a web app. +// DeleteContinuousWebJobSlot 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 { @@ -4485,38 +4506,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 = "2018-02-01" @@ -4527,21 +4548,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 +// DeleteBackupConfigurationResponder handles the response to the DeleteBackupConfiguration 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(), @@ -4551,14 +4572,14 @@ func (client AppsClient) DeleteDomainOwnershipIdentifierSlotResponder(resp *http return } -// DeleteFunction delete a function for web site, or a deployment slot. +// DeleteDeployment 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 { @@ -4572,34 +4593,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), @@ -4613,38 +4634,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 +// DeleteBackupConfigurationSlotResponder handles the response to the DeleteBackupConfigurationSlot 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 deletes a hostname binding for an app. +// DeleteDeploymentSlot 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 { @@ -4658,36 +4681,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), } @@ -4699,21 +4723,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 +// DeleteBackupSlotResponder handles the response to the DeleteBackupSlot 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(), @@ -4723,16 +4747,14 @@ func (client AppsClient) DeleteHostNameBindingResponder(resp *http.Response) (re return } -// DeleteHostNameBindingSlot deletes a hostname binding for an app. +// DeleteDomainOwnershipIdentifier 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 { @@ -4746,38 +4768,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) { +// 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{}{ - "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), + "domainOwnershipIdentifierName": autorest.Encode("path", domainOwnershipIdentifierName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2018-02-01" @@ -4788,21 +4809,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 +// DeleteContinuousWebJobResponder handles the response to the DeleteContinuousWebJob 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(), @@ -4812,15 +4833,16 @@ func (client AppsClient) DeleteHostNameBindingSlotResponder(resp *http.Response) return } -// DeleteHybridConnection removes a Hybrid Connection from this site. +// DeleteDomainOwnershipIdentifierSlot 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 { @@ -4834,38 +4856,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 = "2018-02-01" @@ -4876,40 +4898,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 +// DeleteContinuousWebJobSlotResponder handles the response to the DeleteContinuousWebJobSlot 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 removes a Hybrid Connection from this site. +// DeleteFunction 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 { @@ -4923,38 +4943,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), } @@ -4966,40 +4984,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 +// DeleteDeploymentResponder handles the response to the DeleteDeployment 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 delete a function for web site, or a deployment slot. +// DeleteFunctionSecret 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. If a slot is not specified, the API deletes a deployment for the -// production 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 { @@ -5013,37 +5030,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), } @@ -5055,21 +5072,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(), @@ -5079,17 +5096,16 @@ func (client AppsClient) DeleteInstanceFunctionSlotResponder(resp *http.Response return } -// DeleteInstanceProcess terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out -// instance in a web site. +// DeleteFunctionSecretSlot 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 { @@ -5103,37 +5119,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), } @@ -5145,21 +5162,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(), @@ -5169,19 +5186,14 @@ func (client AppsClient) DeleteInstanceProcessResponder(resp *http.Response) (re return } -// DeleteInstanceProcessSlot terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out -// instance in a web site. +// DeleteHostNameBinding 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 { @@ -5195,38 +5207,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), } @@ -5238,38 +5248,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 +// DeleteDeploymentSlotResponder handles the response to the DeleteDeploymentSlot 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 delete a premier add-on from an app. +// DeleteHostNameBindingSlot 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 { @@ -5283,36 +5295,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), } @@ -5324,40 +5337,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 +// DeleteDomainOwnershipIdentifierResponder handles the response to the DeleteDomainOwnershipIdentifier 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 delete a premier add-on from an app. +// DeleteHostSecret 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 { @@ -5371,37 +5383,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), } @@ -5413,39 +5425,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 terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in -// a web site. +// DeleteHostSecretSlot 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 { @@ -5459,36 +5472,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), } @@ -5500,21 +5515,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(), @@ -5524,17 +5539,15 @@ func (client AppsClient) DeleteProcessResponder(resp *http.Response) (result aut return } -// DeleteProcessSlot terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out -// instance in a web site. +// DeleteHybridConnection 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 { @@ -5548,37 +5561,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), } @@ -5590,38 +5603,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 +// DeleteDomainOwnershipIdentifierSlotResponder handles the response to the DeleteDomainOwnershipIdentifierSlot 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 deletes a hostname binding for an app. +// DeleteHybridConnectionSlot 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 { @@ -5635,37 +5650,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 = "2018-02-01" @@ -5676,40 +5693,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 +// DeleteFunctionResponder handles the response to the DeleteFunction 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 deletes a hostname binding for an app. +// DeleteInstanceFunctionSlot 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 { @@ -5723,38 +5739,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 = "2018-02-01" @@ -5765,38 +5781,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 +// DeleteFunctionSecretResponder handles the response to the DeleteFunctionSecret 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 deletes a relay service connection by its name. +// DeleteInstanceProcess 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 { @@ -5810,35 +5829,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), } @@ -5851,40 +5871,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 +// DeleteFunctionSecretSlotResponder handles the response to the DeleteFunctionSecretSlot 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 deletes a relay service connection by its name. +// DeleteInstanceProcessSlot 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 { @@ -5898,35 +5921,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), @@ -5940,38 +5964,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 +// DeleteHostNameBindingResponder handles the response to the DeleteHostNameBinding 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 remove a site extension from a web site, or a deployment slot. +// DeletePremierAddOn 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 { @@ -5985,36 +6009,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), } @@ -6026,40 +6050,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 +// DeleteHostNameBindingSlotResponder handles the response to the DeleteHostNameBindingSlot 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 remove a site extension from a web site, or a deployment slot. +// DeletePremierAddOnSlot 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 { @@ -6073,36 +6097,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), } @@ -6115,41 +6139,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 +// DeleteHostSecretResponder handles the response to the DeleteHostSecret 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 deletes a web, mobile, or API app, or one of the deployment slots. +// DeleteProcess 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 { @@ -6163,36 +6185,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), } @@ -6200,31 +6222,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 +// DeleteHostSecretSlotResponder handles the response to the DeleteHostSecretSlot 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(), @@ -6234,13 +6250,17 @@ func (client AppsClient) DeleteSlotResponder(resp *http.Response) (result autore return } -// DeleteSourceControl deletes the source control configuration of an app. +// DeleteProcessSlot 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 { @@ -6254,35 +6274,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), } @@ -6294,39 +6316,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 +// DeleteHybridConnectionResponder handles the response to the DeleteHybridConnection 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 deletes the source control configuration of an app. +// DeletePublicCertificate 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 { @@ -6340,37 +6361,37 @@ 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 = "2018-02-01" @@ -6381,37 +6402,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 +// DeleteHybridConnectionSlotResponder handles the response to the DeleteHybridConnectionSlot 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 deletes a Swift Virtual Network connection from an app (or deployment slot). +// DeletePublicCertificateSlot 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 { @@ -6425,36 +6449,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 = "2018-02-01" @@ -6465,39 +6491,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 +// DeleteInstanceFunctionSlotResponder handles the response to the DeleteInstanceFunctionSlot 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 deletes a Swift Virtual Network connection from an app (or deployment slot). +// DeleteRelayServiceConnection 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 { @@ -6511,36 +6536,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), } @@ -6552,21 +6577,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 +// DeleteInstanceProcessResponder handles the response to the DeleteInstanceProcess 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(), @@ -6576,14 +6601,16 @@ func (client AppsClient) DeleteSwiftVirtualNetworkSlotResponder(resp *http.Respo return } -// DeleteTriggeredWebJob delete a triggered web job by its ID for an app, or a deployment slot. +// DeleteRelayServiceConnectionSlot 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 { @@ -6597,37 +6624,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 = "2018-02-01" @@ -6638,40 +6666,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 +// DeleteInstanceProcessSlotResponder handles the response to the DeleteInstanceProcessSlot 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 delete a triggered web job by its ID for an app, or a deployment slot. +// DeleteSiteExtension 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 a deployment 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 { @@ -6685,38 +6711,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 = "2018-02-01" @@ -6727,38 +6752,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 +// DeletePremierAddOnResponder handles the response to the DeletePremierAddOn 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 deletes a connection from an app (or deployment slot to a named virtual network. +// DeleteSiteExtensionSlot 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 { @@ -6772,37 +6799,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 = "2018-02-01" @@ -6813,40 +6841,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 +// DeletePremierAddOnSlotResponder handles the response to the DeletePremierAddOnSlot 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 deletes a connection from an app (or deployment slot to a named virtual network. +// DeleteSlot 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 { @@ -6860,85 +6889,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 = "2018-02-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}", pathParameters), + 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.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 +// DeleteProcessResponder handles the response to the DeleteProcess 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 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 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) }() @@ -6947,38 +6979,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), @@ -6991,50 +7018,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 +// DeleteProcessSlotResponder handles the response to the DeleteProcessSlot 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 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 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) }() @@ -7043,38 +7065,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), @@ -7088,42 +7105,39 @@ 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 +// DeletePublicCertificateResponder handles the response to the DeletePublicCertificate 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 generates a new publishing password for an app (or deployment slot, if specified). +// DeleteSwiftVirtualNetwork 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 { @@ -7137,32 +7151,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), @@ -7175,42 +7189,41 @@ 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 +// DeletePublicCertificateSlotResponder handles the response to the DeletePublicCertificateSlot 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 generates a new publishing password for an app (or deployment slot, if -// specified). +// DeleteSwiftVirtualNetworkSlot 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 { @@ -7224,32 +7237,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), @@ -7263,43 +7276,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 +// DeleteRelayServiceConnectionResponder handles the response to the DeleteRelayServiceConnection 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 gets the details of a web, mobile, or API app. +// DeleteTriggeredWebJob 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) }() @@ -7309,36 +7323,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 = "2018-02-01" @@ -7347,44 +7362,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 +// DeleteRelayServiceConnectionSlotResponder handles the response to the DeleteRelayServiceConnectionSlot 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 } -// GetAuthSettings gets the Authentication/Authorization settings of an app. +// DeleteTriggeredWebJobSlot 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) GetAuthSettings(ctx context.Context, resourceGroupName string, name string) (result SiteAuthSettings, 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) 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.GetAuthSettings") + 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) }() @@ -7394,36 +7411,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", "DeleteTriggeredWebJobSlot", err.Error()) } - req, err := client.GetAuthSettingsPreparer(ctx, resourceGroupName, name) + req, err := client.DeleteTriggeredWebJobSlotPreparer(ctx, resourceGroupName, name, webJobName, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettings", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJobSlot", nil, "Failure preparing request") return } - resp, err := client.GetAuthSettingsSender(req) + resp, err := client.DeleteTriggeredWebJobSlotSender(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", "DeleteTriggeredWebJobSlot", resp, "Failure sending request") return } - result, err = client.GetAuthSettingsResponder(resp) + result, err = client.DeleteTriggeredWebJobSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettings", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJobSlot", 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) { +// 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{}{ "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 = "2018-02-01" @@ -7432,46 +7451,44 @@ 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}/triggeredwebjobs/{webJobName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetAuthSettingsSender sends the GetAuthSettings 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) GetAuthSettingsSender(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...) } -// GetAuthSettingsResponder handles the response to the GetAuthSettings request. The method always +// DeleteSiteExtensionResponder handles the response to the DeleteSiteExtension request. The method always // closes the http.Response Body. -func (client AppsClient) GetAuthSettingsResponder(resp *http.Response) (result SiteAuthSettings, 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 } -// GetAuthSettingsSlot gets the Authentication/Authorization settings of an app. +// DeleteVnetConnection 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. -// 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) { +// 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.GetAuthSettingsSlot") + 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) }() @@ -7481,37 +7498,37 @@ func (client AppsClient) GetAuthSettingsSlot(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", "GetAuthSettingsSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteVnetConnection", err.Error()) } - req, err := client.GetAuthSettingsSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.DeleteVnetConnectionPreparer(ctx, resourceGroupName, name, vnetName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettingsSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteVnetConnection", nil, "Failure preparing request") return } - resp, err := client.GetAuthSettingsSlotSender(req) + resp, err := client.DeleteVnetConnectionSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettingsSlot", resp, "Failure sending request") + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteVnetConnection", resp, "Failure sending request") return } - result, err = client.GetAuthSettingsSlotResponder(resp) + result, err = client.DeleteVnetConnectionResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettingsSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteVnetConnection", 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) { +// 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), - "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vnetName": autorest.Encode("path", vnetName), } const APIVersion = "2018-02-01" @@ -7520,44 +7537,46 @@ func (client AppsClient) GetAuthSettingsSlotPreparer(ctx context.Context, resour } preparer := autorest.CreatePreparer( - autorest.AsPost(), + autorest.AsDelete(), 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}/virtualNetworkConnections/{vnetName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetAuthSettingsSlotSender sends the GetAuthSettingsSlot 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) GetAuthSettingsSlotSender(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...) } -// GetAuthSettingsSlotResponder handles the response to the GetAuthSettingsSlot request. The method always +// DeleteSiteExtensionSlotResponder handles the response to the DeleteSiteExtensionSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetAuthSettingsSlotResponder(resp *http.Response) (result SiteAuthSettings, 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 } -// GetBackupConfiguration gets the backup configuration of an app. +// DeleteVnetConnectionSlot 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) GetBackupConfiguration(ctx context.Context, resourceGroupName string, name string) (result BackupRequest, 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.GetBackupConfiguration") + 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) }() @@ -7567,36 +7586,38 @@ func (client AppsClient) GetBackupConfiguration(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", "GetBackupConfiguration", err.Error()) + return result, validation.NewError("web.AppsClient", "DeleteVnetConnectionSlot", err.Error()) } - req, err := client.GetBackupConfigurationPreparer(ctx, resourceGroupName, name) + req, err := client.DeleteVnetConnectionSlotPreparer(ctx, resourceGroupName, name, vnetName, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupConfiguration", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteVnetConnectionSlot", nil, "Failure preparing request") return } - resp, err := client.GetBackupConfigurationSender(req) + resp, err := client.DeleteVnetConnectionSlotSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupConfiguration", resp, "Failure sending request") + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteVnetConnectionSlot", resp, "Failure sending request") return } - result, err = client.GetBackupConfigurationResponder(resp) + result, err = client.DeleteVnetConnectionSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupConfiguration", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteVnetConnectionSlot", 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) { +// 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 = "2018-02-01" @@ -7605,42 +7626,41 @@ func (client AppsClient) GetBackupConfigurationPreparer(ctx context.Context, res } preparer := autorest.CreatePreparer( - autorest.AsPost(), + autorest.AsDelete(), 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}/virtualNetworkConnections/{vnetName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetBackupConfigurationSender sends the GetBackupConfiguration 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) GetBackupConfigurationSender(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...) } -// GetBackupConfigurationResponder handles the response to the GetBackupConfiguration request. The method always +// DeleteSlotResponder handles the response to the DeleteSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetBackupConfigurationResponder(resp *http.Response) (result BackupRequest, 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 } -// GetBackupConfigurationSlot gets the backup configuration of an app. +// DiscoverBackup 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 backup configuration -// for the production slot. -func (client AppsClient) GetBackupConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result BackupRequest, 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.GetBackupConfigurationSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DiscoverBackup") defer func() { sc := -1 if result.Response.Response != nil { @@ -7653,37 +7673,41 @@ func (client AppsClient) GetBackupConfigurationSlot(ctx context.Context, resourc {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", "GetBackupConfigurationSlot", 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.GetBackupConfigurationSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.DiscoverBackupPreparer(ctx, resourceGroupName, name, request) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupConfigurationSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DiscoverBackup", nil, "Failure preparing request") return } - resp, err := client.GetBackupConfigurationSlotSender(req) + resp, err := client.DiscoverBackupSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupConfigurationSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DiscoverBackup", resp, "Failure sending request") return } - result, err = client.GetBackupConfigurationSlotResponder(resp) + result, err = client.DiscoverBackupResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupConfigurationSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DiscoverBackup", 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) { +// 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), } @@ -7693,23 +7717,25 @@ func (client AppsClient) GetBackupConfigurationSlotPreparer(ctx context.Context, } 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/backup/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)) } -// GetBackupConfigurationSlotSender sends the GetBackupConfigurationSlot 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) GetBackupConfigurationSlotSender(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...) } -// GetBackupConfigurationSlotResponder handles the response to the GetBackupConfigurationSlot request. The method always +// DiscoverBackupResponder handles the response to the DiscoverBackup request. The method always // closes the http.Response Body. -func (client AppsClient) GetBackupConfigurationSlotResponder(resp *http.Response) (result BackupRequest, err error) { +func (client AppsClient) DiscoverBackupResponder(resp *http.Response) (result RestoreRequest, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -7720,14 +7746,17 @@ func (client AppsClient) GetBackupConfigurationSlotResponder(resp *http.Response return } -// GetBackupStatus gets a backup of an app by its ID. +// DiscoverBackupSlot 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. -// backupID - ID of the backup. -func (client AppsClient) GetBackupStatus(ctx context.Context, resourceGroupName string, name string, backupID string) (result BackupItem, 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.GetBackupStatus") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DiscoverBackupSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -7740,37 +7769,42 @@ func (client AppsClient) GetBackupStatus(ctx context.Context, resourceGroupName {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", "GetBackupStatus", 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", "DiscoverBackupSlot", err.Error()) } - req, err := client.GetBackupStatusPreparer(ctx, resourceGroupName, name, backupID) + req, err := client.DiscoverBackupSlotPreparer(ctx, resourceGroupName, name, request, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupStatus", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DiscoverBackupSlot", nil, "Failure preparing request") return } - resp, err := client.GetBackupStatusSender(req) + resp, err := client.DiscoverBackupSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupStatus", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DiscoverBackupSlot", resp, "Failure sending request") return } - result, err = client.GetBackupStatusResponder(resp) + result, err = client.DiscoverBackupSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupStatus", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DiscoverBackupSlot", 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) { +// 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{}{ - "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), } @@ -7780,23 +7814,25 @@ func (client AppsClient) GetBackupStatusPreparer(ctx context.Context, resourceGr } preparer := autorest.CreatePreparer( - autorest.AsGet(), + 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}", 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)) } -// GetBackupStatusSender sends the GetBackupStatus 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) GetBackupStatusSender(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...) } -// GetBackupStatusResponder handles the response to the GetBackupStatus request. The method always +// DeleteSourceControlSlotResponder handles the response to the DeleteSourceControlSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetBackupStatusResponder(resp *http.Response) (result BackupItem, err error) { +func (client AppsClient) DiscoverBackupSlotResponder(resp *http.Response) (result RestoreRequest, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -7807,20 +7843,17 @@ func (client AppsClient) GetBackupStatusResponder(resp *http.Response) (result B return } -// GetBackupStatusSlot gets a backup of an app by its ID. +// GenerateNewSitePublishingPassword 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. -// 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) GenerateNewSitePublishingPassword(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetBackupStatusSlot") + 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) }() @@ -7830,37 +7863,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", "GenerateNewSitePublishingPassword", err.Error()) } - req, err := client.GetBackupStatusSlotPreparer(ctx, resourceGroupName, name, backupID, slot) + req, err := client.GenerateNewSitePublishingPasswordPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupStatusSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GenerateNewSitePublishingPassword", nil, "Failure preparing request") return } - resp, err := client.GetBackupStatusSlotSender(req) + resp, err := client.GenerateNewSitePublishingPasswordSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupStatusSlot", resp, "Failure sending request") + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppsClient", "GenerateNewSitePublishingPassword", resp, "Failure sending request") return } - result, err = client.GetBackupStatusSlotResponder(resp) + result, err = client.GenerateNewSitePublishingPasswordResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupStatusSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GenerateNewSitePublishingPassword", 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) { +// GenerateNewSitePublishingPasswordPreparer prepares the GenerateNewSitePublishingPassword request. +func (client AppsClient) GenerateNewSitePublishingPasswordPreparer(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), } @@ -7870,45 +7901,46 @@ func (client AppsClient) GetBackupStatusSlotPreparer(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}/backups/{backupId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetBackupStatusSlotSender sends the GetBackupStatusSlot 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) GetBackupStatusSlotSender(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...) } -// GetBackupStatusSlotResponder handles the response to the GetBackupStatusSlot request. The method always +// DeleteSwiftVirtualNetworkResponder handles the response to the DeleteSwiftVirtualNetwork request. The method always // closes the http.Response Body. -func (client AppsClient) GetBackupStatusSlotResponder(resp *http.Response) (result BackupItem, 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 } -// GetConfiguration gets the configuration of an app, such as platform version and bitness, default documents, virtual -// applications, Always On, etc. +// GenerateNewSitePublishingPasswordSlot 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. -func (client AppsClient) GetConfiguration(ctx context.Context, resourceGroupName string, name string) (result SiteConfigResource, 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.GetConfiguration") + 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) }() @@ -7918,35 +7950,36 @@ 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", "GenerateNewSitePublishingPasswordSlot", err.Error()) } - req, err := client.GetConfigurationPreparer(ctx, resourceGroupName, name) + req, err := client.GenerateNewSitePublishingPasswordSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfiguration", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GenerateNewSitePublishingPasswordSlot", nil, "Failure preparing request") return } - resp, err := client.GetConfigurationSender(req) + resp, err := client.GenerateNewSitePublishingPasswordSlotSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfiguration", resp, "Failure sending request") + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppsClient", "GenerateNewSitePublishingPasswordSlot", resp, "Failure sending request") return } - result, err = client.GetConfigurationResponder(resp) + result, err = client.GenerateNewSitePublishingPasswordSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfiguration", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GenerateNewSitePublishingPasswordSlot", 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) { +// 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{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -7956,43 +7989,39 @@ func (client AppsClient) GetConfigurationPreparer(ctx context.Context, resourceG } preparer := autorest.CreatePreparer( - autorest.AsGet(), + autorest.AsPost(), 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}/slots/{slot}/newpassword", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetConfigurationSender sends the GetConfiguration 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) GetConfigurationSender(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...) } -// GetConfigurationResponder handles the response to the GetConfiguration request. The method always +// DeleteSwiftVirtualNetworkSlotResponder handles the response to the DeleteSwiftVirtualNetworkSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetConfigurationResponder(resp *http.Response) (result SiteConfigResource, 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 } -// GetConfigurationSlot gets the configuration of an app, such as platform version and bitness, default documents, -// virtual applications, Always On, etc. +// Get 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. -// 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) Get(ctx context.Context, resourceGroupName string, name string) (result Site, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetConfigurationSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.Get") defer func() { sc := -1 if result.Response.Response != nil { @@ -8006,36 +8035,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", "Get", err.Error()) } - req, err := client.GetConfigurationSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.GetPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "Get", nil, "Failure preparing request") return } - resp, err := client.GetConfigurationSlotSender(req) + resp, err := client.GetSender(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", "Get", resp, "Failure sending request") return } - result, err = client.GetConfigurationSlotResponder(resp) + result, err = client.GetResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "Get", 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) { +// GetPreparer prepares the Get request. +func (client AppsClient) GetPreparer(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), } @@ -8047,39 +8075,38 @@ 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}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetConfigurationSlotSender sends the GetConfigurationSlot 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) GetConfigurationSlotSender(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...) } -// GetConfigurationSlotResponder handles the response to the GetConfigurationSlot request. The method always +// DeleteTriggeredWebJobResponder handles the response to the DeleteTriggeredWebJob request. The method always // closes the http.Response Body. -func (client AppsClient) GetConfigurationSlotResponder(resp *http.Response) (result SiteConfigResource, 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 } -// GetConfigurationSnapshot gets a snapshot of the configuration of an app at a previous point in time. +// GetAuthSettings 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 { @@ -8093,36 +8120,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), } @@ -8132,23 +8158,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 +// DeleteTriggeredWebJobSlotResponder handles the response to the DeleteTriggeredWebJobSlot 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(), @@ -8159,16 +8185,15 @@ func (client AppsClient) GetConfigurationSnapshotResponder(resp *http.Response) return } -// GetConfigurationSnapshotSlot gets a snapshot of the configuration of an app at a previous point in time. +// GetAuthSettingsSlot 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 { @@ -8182,37 +8207,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), } @@ -8222,23 +8246,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 +// DeleteVnetConnectionResponder handles the response to the DeleteVnetConnection 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(), @@ -8249,13 +8273,13 @@ func (client AppsClient) GetConfigurationSnapshotSlotResponder(resp *http.Respon return } -// GetContainerLogsZip gets the ZIP archived docker log files for the given site +// GetBackupConfiguration 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 { @@ -8269,32 +8293,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), @@ -8309,38 +8333,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 +// DeleteVnetConnectionSlotResponder handles the response to the DeleteVnetConnectionSlot 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 gets the ZIP archived docker log files for the given site +// GetBackupConfigurationSlot 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 { @@ -8354,32 +8380,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), @@ -8395,38 +8421,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 +// DiscoverBackupResponder handles the response to the DiscoverBackup 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 gets a continuous web job by its ID for an app, or a deployment slot. +// GetBackupStatus 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 { @@ -8440,37 +8467,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 = "2018-02-01" @@ -8481,41 +8508,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 +// DiscoverBackupSlotResponder handles the response to the DiscoverBackupSlot 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 gets a continuous web job by its ID for an app, or a deployment slot. +// GetBackupStatusSlot 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 { @@ -8529,38 +8556,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 = "2018-02-01" @@ -8571,39 +8598,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 +// GenerateNewSitePublishingPasswordResponder handles the response to the GenerateNewSitePublishingPassword 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 get a deployment by its ID for an app, or a deployment slot. +// GetConfiguration 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 { @@ -8617,34 +8644,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), @@ -8658,21 +8684,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 +// GenerateNewSitePublishingPasswordSlotResponder handles the response to the GenerateNewSitePublishingPasswordSlot 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(), @@ -8683,16 +8709,16 @@ func (client AppsClient) GetDeploymentResponder(resp *http.Response) (result Dep return } -// GetDeploymentSlot get a deployment by its ID for an app, or a deployment slot. +// GetConfigurationSlot 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 { @@ -8706,34 +8732,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), @@ -8748,21 +8773,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 +// GetResponder handles the response to the Get 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(), @@ -8773,13 +8798,14 @@ func (client AppsClient) GetDeploymentSlotResponder(resp *http.Response) (result return } -// GetDiagnosticLogsConfiguration gets the logging configuration of an app. +// GetConfigurationSnapshot 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 { @@ -8793,35 +8819,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), } @@ -8833,21 +8860,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 +// GetAuthSettingsResponder handles the response to the GetAuthSettings 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(), @@ -8858,15 +8885,16 @@ func (client AppsClient) GetDiagnosticLogsConfigurationResponder(resp *http.Resp return } -// GetDiagnosticLogsConfigurationSlot gets the logging configuration of an app. +// GetConfigurationSnapshotSlot 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 { @@ -8880,36 +8908,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), } @@ -8921,21 +8950,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 +// GetAuthSettingsSlotResponder handles the response to the GetAuthSettingsSlot 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(), @@ -8946,14 +8975,13 @@ func (client AppsClient) GetDiagnosticLogsConfigurationSlotResponder(resp *http. return } -// GetDomainOwnershipIdentifier get domain ownership identifier for web app. +// GetContainerLogsZip 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 { @@ -8967,37 +8995,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 = "2018-02-01" @@ -9006,43 +9033,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 +// GetBackupConfigurationResponder handles the response to the GetBackupConfiguration 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 get domain ownership identifier for web app. +// GetContainerLogsZipSlot 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 { @@ -9056,38 +9080,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 = "2018-02-01" @@ -9096,41 +9119,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 +// GetBackupConfigurationSlotResponder handles the response to the GetBackupConfigurationSlot 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 get function information by its ID for web site, or a deployment slot. +// GetContinuousWebJob 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 { @@ -9144,37 +9166,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 = "2018-02-01" @@ -9185,21 +9207,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 +// GetBackupStatusResponder handles the response to the GetBackupStatus 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(), @@ -9210,13 +9232,16 @@ func (client AppsClient) GetFunctionResponder(resp *http.Response) (result Funct return } -// GetFunctionsAdminToken fetch a short lived token that can be exchanged for a master key. +// GetContinuousWebJobSlot 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 { @@ -9230,36 +9255,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 = "2018-02-01" @@ -9270,39 +9297,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 +// GetBackupStatusSlotResponder handles the response to the GetBackupStatusSlot 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 fetch a short lived token that can be exchanged for a master key. +// GetDeployment 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 { @@ -9316,36 +9343,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), } @@ -9357,39 +9384,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 +// GetConfigurationResponder handles the response to the GetConfiguration 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 get the named hostname binding for an app (or deployment slot, if specified). +// GetDeploymentSlot 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 { @@ -9403,36 +9432,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), } @@ -9444,21 +9474,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 +// GetConfigurationSlotResponder handles the response to the GetConfigurationSlot 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(), @@ -9469,16 +9499,13 @@ func (client AppsClient) GetHostNameBindingResponder(resp *http.Response) (resul return } -// GetHostNameBindingSlot get the named hostname binding for an app (or deployment slot, if specified). +// GetDiagnosticLogsConfiguration 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 { @@ -9492,37 +9519,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), } @@ -9534,21 +9559,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 +// GetConfigurationSnapshotResponder handles the response to the GetConfigurationSnapshot 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(), @@ -9559,15 +9584,15 @@ func (client AppsClient) GetHostNameBindingSlotResponder(resp *http.Response) (r return } -// GetHybridConnection retrieves a specific Service Bus Hybrid Connection used by this Web App. +// GetDiagnosticLogsConfigurationSlot 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 { @@ -9581,37 +9606,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), } @@ -9623,21 +9647,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 +// GetConfigurationSnapshotSlotResponder handles the response to the GetConfigurationSnapshotSlot 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(), @@ -9648,16 +9672,14 @@ func (client AppsClient) GetHybridConnectionResponder(resp *http.Response) (resu return } -// GetHybridConnectionSlot retrieves a specific Service Bus Hybrid Connection used by this Web App. +// GetDomainOwnershipIdentifier 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 { @@ -9671,39 +9693,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 = "2018-02-01" @@ -9714,21 +9734,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 +// GetContainerLogsZipResponder handles the response to the GetContainerLogsZip 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(), @@ -9739,16 +9759,16 @@ func (client AppsClient) GetHybridConnectionSlotResponder(resp *http.Response) ( return } -// GetInstanceFunctionSlot get function information by its ID for web site, or a deployment slot. +// GetDomainOwnershipIdentifierSlot 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. If a slot is not specified, the API deletes a deployment for the +// 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) GetInstanceFunctionSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (result FunctionEnvelope, err error) { +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 { @@ -9762,38 +9782,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 = "2018-02-01" @@ -9804,39 +9824,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 +// GetContainerLogsZipSlotResponder handles the response to the GetContainerLogsZipSlot 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 } -// GetInstanceMSDeployLog get the MSDeploy Log for the last MSDeploy operation. +// GetFunction 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 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) { +// 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.GetInstanceMSDeployLog") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetFunction") defer func() { sc := -1 if result.Response.Response != nil { @@ -9850,34 +9870,34 @@ 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", "GetFunction", err.Error()) } - req, err := client.GetInstanceMSDeployLogPreparer(ctx, resourceGroupName, name, instanceID) + req, err := client.GetFunctionPreparer(ctx, resourceGroupName, name, functionName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLog", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunction", nil, "Failure preparing request") return } - resp, err := client.GetInstanceMSDeployLogSender(req) + resp, err := client.GetFunctionSender(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", "GetFunction", resp, "Failure sending request") return } - result, err = client.GetInstanceMSDeployLogResponder(resp) + result, err = client.GetFunctionResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLog", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunction", 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) { +// 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), @@ -9891,21 +9911,21 @@ 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}/functions/{functionName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetInstanceMSDeployLogSender sends the GetInstanceMSDeployLog 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) GetInstanceMSDeployLogSender(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...) } -// GetInstanceMSDeployLogResponder handles the response to the GetInstanceMSDeployLog request. The method always +// GetContinuousWebJobResponder handles the response to the GetContinuousWebJob request. The method always // closes the http.Response Body. -func (client AppsClient) GetInstanceMSDeployLogResponder(resp *http.Response) (result MSDeployLog, err error) { +func (client AppsClient) GetFunctionResponder(resp *http.Response) (result FunctionEnvelope, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -9916,15 +9936,13 @@ func (client AppsClient) GetInstanceMSDeployLogResponder(resp *http.Response) (r return } -// GetInstanceMSDeployLogSlot get the MSDeploy Log for the last MSDeploy operation. +// GetFunctionsAdminToken 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. -// 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) { +func (client AppsClient) GetFunctionsAdminToken(ctx context.Context, resourceGroupName string, name string) (result String, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceMSDeployLogSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetFunctionsAdminToken") defer func() { sc := -1 if result.Response.Response != nil { @@ -9938,37 +9956,35 @@ 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", "GetFunctionsAdminToken", err.Error()) } - req, err := client.GetInstanceMSDeployLogSlotPreparer(ctx, resourceGroupName, name, slot, instanceID) + req, err := client.GetFunctionsAdminTokenPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLogSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminToken", nil, "Failure preparing request") return } - resp, err := client.GetInstanceMSDeployLogSlotSender(req) + resp, err := client.GetFunctionsAdminTokenSender(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", "GetFunctionsAdminToken", resp, "Failure sending request") return } - result, err = client.GetInstanceMSDeployLogSlotResponder(resp) + result, err = client.GetFunctionsAdminTokenResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLogSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminToken", 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) { +// 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), } @@ -9980,39 +9996,39 @@ 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}/functions/admin/token", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetInstanceMSDeployLogSlotSender sends the GetInstanceMSDeployLogSlot 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) GetInstanceMSDeployLogSlotSender(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...) } -// GetInstanceMSDeployLogSlotResponder handles the response to the GetInstanceMSDeployLogSlot request. The method always +// GetContinuousWebJobSlotResponder handles the response to the GetContinuousWebJobSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetInstanceMSDeployLogSlotResponder(resp *http.Response) (result MSDeployLog, err error) { +func (client AppsClient) GetFunctionsAdminTokenResponder(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 } -// GetInstanceMsDeployStatus get the status of the last MSDeploy operation. +// GetFunctionsAdminTokenSlot 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) GetInstanceMsDeployStatus(ctx context.Context, resourceGroupName string, name string, instanceID string) (result MSDeployStatus, 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.GetInstanceMsDeployStatus") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetFunctionsAdminTokenSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -10026,36 +10042,36 @@ 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", "GetFunctionsAdminTokenSlot", err.Error()) } - req, err := client.GetInstanceMsDeployStatusPreparer(ctx, resourceGroupName, name, instanceID) + req, err := client.GetFunctionsAdminTokenSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatus", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminTokenSlot", nil, "Failure preparing request") return } - resp, err := client.GetInstanceMsDeployStatusSender(req) + resp, err := client.GetFunctionsAdminTokenSlotSender(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", "GetFunctionsAdminTokenSlot", resp, "Failure sending request") return } - result, err = client.GetInstanceMsDeployStatusResponder(resp) + result, err = client.GetFunctionsAdminTokenSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatus", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminTokenSlot", 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) { +// 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), } @@ -10067,40 +10083,39 @@ 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}/functions/admin/token", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetInstanceMsDeployStatusSender sends the GetInstanceMsDeployStatus 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) GetInstanceMsDeployStatusSender(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...) } -// GetInstanceMsDeployStatusResponder handles the response to the GetInstanceMsDeployStatus request. The method always +// GetDeploymentResponder handles the response to the GetDeployment request. The method always // closes the http.Response Body. -func (client AppsClient) GetInstanceMsDeployStatusResponder(resp *http.Response) (result MSDeployStatus, err error) { +func (client AppsClient) GetFunctionsAdminTokenSlotResponder(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 } -// GetInstanceMsDeployStatusSlot get the status of the last MSDeploy operation. +// GetHostNameBinding 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) GetInstanceMsDeployStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (result MSDeployStatus, 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.GetInstanceMsDeployStatusSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetHostNameBinding") defer func() { sc := -1 if result.Response.Response != nil { @@ -10114,37 +10129,36 @@ 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", "GetHostNameBinding", err.Error()) } - req, err := client.GetInstanceMsDeployStatusSlotPreparer(ctx, resourceGroupName, name, slot, instanceID) + req, err := client.GetHostNameBindingPreparer(ctx, resourceGroupName, name, hostName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatusSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHostNameBinding", nil, "Failure preparing request") return } - resp, err := client.GetInstanceMsDeployStatusSlotSender(req) + resp, err := client.GetHostNameBindingSender(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", "GetHostNameBinding", resp, "Failure sending request") return } - result, err = client.GetInstanceMsDeployStatusSlotResponder(resp) + result, err = client.GetHostNameBindingResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatusSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHostNameBinding", 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) { +// 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), } @@ -10156,21 +10170,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}/hostNameBindings/{hostName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetInstanceMsDeployStatusSlotSender sends the GetInstanceMsDeployStatusSlot 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) GetInstanceMsDeployStatusSlotSender(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...) } -// GetInstanceMsDeployStatusSlotResponder handles the response to the GetInstanceMsDeployStatusSlot request. The method always +// GetDeploymentSlotResponder handles the response to the GetDeploymentSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetInstanceMsDeployStatusSlotResponder(resp *http.Response) (result MSDeployStatus, err error) { +func (client AppsClient) GetHostNameBindingResponder(resp *http.Response) (result HostNameBinding, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -10181,16 +10195,16 @@ func (client AppsClient) GetInstanceMsDeployStatusSlotResponder(resp *http.Respo return } -// GetInstanceProcess get process information by its ID for a specific scaled-out instance in a web site. +// GetHostNameBindingSlot 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 - 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 - 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.GetInstanceProcess") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetHostNameBindingSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -10204,37 +10218,37 @@ 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", "GetHostNameBindingSlot", err.Error()) } - req, err := client.GetInstanceProcessPreparer(ctx, resourceGroupName, name, processID, instanceID) + req, err := client.GetHostNameBindingSlotPreparer(ctx, resourceGroupName, name, slot, hostName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcess", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHostNameBindingSlot", nil, "Failure preparing request") return } - resp, err := client.GetInstanceProcessSender(req) + resp, err := client.GetHostNameBindingSlotSender(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", "GetHostNameBindingSlot", resp, "Failure sending request") return } - result, err = client.GetInstanceProcessResponder(resp) + result, err = client.GetHostNameBindingSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcess", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHostNameBindingSlot", 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) { +// 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), - "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -10246,41 +10260,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}/hostNameBindings/{hostName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetInstanceProcessSender sends the GetInstanceProcess 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) GetInstanceProcessSender(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...) } -// GetInstanceProcessResponder handles the response to the GetInstanceProcess request. The method always +// GetDiagnosticLogsConfigurationResponder handles the response to the GetDiagnosticLogsConfiguration request. The method always // closes the http.Response Body. -func (client AppsClient) GetInstanceProcessResponder(resp *http.Response) (result ProcessInfo, err error) { +func (client AppsClient) GetHostNameBindingSlotResponder(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 } -// GetInstanceProcessDump get a memory dump of a process by its ID for a specific scaled-out instance in a web site. +// GetHybridConnection 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) GetInstanceProcessDump(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (result ReadCloser, 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.GetInstanceProcessDump") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetHybridConnection") defer func() { sc := -1 if result.Response.Response != nil { @@ -10294,36 +10307,36 @@ 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", "GetHybridConnection", err.Error()) } - req, err := client.GetInstanceProcessDumpPreparer(ctx, resourceGroupName, name, processID, instanceID) + req, err := client.GetHybridConnectionPreparer(ctx, resourceGroupName, name, namespaceName, relayName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDump", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHybridConnection", nil, "Failure preparing request") return } - resp, err := client.GetInstanceProcessDumpSender(req) + resp, err := client.GetHybridConnectionSender(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", "GetHybridConnection", resp, "Failure sending request") return } - result, err = client.GetInstanceProcessDumpResponder(resp) + result, err = client.GetHybridConnectionResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDump", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHybridConnection", 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) { +// 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), - "processId": autorest.Encode("path", processID), + "namespaceName": autorest.Encode("path", namespaceName), + "relayName": autorest.Encode("path", relayName), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -10336,43 +10349,41 @@ 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}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetInstanceProcessDumpSender sends the GetInstanceProcessDump 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) GetInstanceProcessDumpSender(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...) } -// GetInstanceProcessDumpResponder handles the response to the GetInstanceProcessDump request. The method always +// GetDiagnosticLogsConfigurationSlotResponder handles the response to the GetDiagnosticLogsConfigurationSlot 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) GetHybridConnectionResponder(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 } -// GetInstanceProcessDumpSlot get a memory dump of a process by its ID for a specific scaled-out instance in a web -// site. +// GetHybridConnectionSlot 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. -// 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 - 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.GetInstanceProcessDumpSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetHybridConnectionSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -10386,36 +10397,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", "GetHybridConnectionSlot", err.Error()) } - req, err := client.GetInstanceProcessDumpSlotPreparer(ctx, resourceGroupName, name, processID, slot, instanceID) + req, err := client.GetHybridConnectionSlotPreparer(ctx, resourceGroupName, name, namespaceName, relayName, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDumpSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHybridConnectionSlot", nil, "Failure preparing request") return } - resp, err := client.GetInstanceProcessDumpSlotSender(req) + resp, err := client.GetHybridConnectionSlotSender(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", "GetHybridConnectionSlot", resp, "Failure sending request") return } - result, err = client.GetInstanceProcessDumpSlotResponder(resp) + result, err = client.GetHybridConnectionSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDumpSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHybridConnectionSlot", 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) { +// 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), @@ -10429,41 +10440,40 @@ 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}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetInstanceProcessDumpSlotSender sends the GetInstanceProcessDumpSlot 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) GetInstanceProcessDumpSlotSender(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...) } -// GetInstanceProcessDumpSlotResponder handles the response to the GetInstanceProcessDumpSlot request. The method always +// GetDomainOwnershipIdentifierResponder handles the response to the GetDomainOwnershipIdentifier 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) 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 } -// GetInstanceProcessModule get process information by its ID for a specific scaled-out instance in a web site. +// GetInstanceFunctionSlot 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. -// 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) { +// 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.GetInstanceProcessModule") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceFunctionSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -10477,38 +10487,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", "GetInstanceFunctionSlot", err.Error()) } - req, err := client.GetInstanceProcessModulePreparer(ctx, resourceGroupName, name, processID, baseAddress, instanceID) + req, err := client.GetInstanceFunctionSlotPreparer(ctx, resourceGroupName, name, functionName, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModule", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceFunctionSlot", nil, "Failure preparing request") return } - resp, err := client.GetInstanceProcessModuleSender(req) + resp, err := client.GetInstanceFunctionSlotSender(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", "GetInstanceFunctionSlot", resp, "Failure sending request") return } - result, err = client.GetInstanceProcessModuleResponder(resp) + result, err = client.GetInstanceFunctionSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModule", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceFunctionSlot", 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) { +// 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{}{ - "baseAddress": autorest.Encode("path", baseAddress), - "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), } @@ -10520,21 +10529,21 @@ 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}/functions/{functionName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetInstanceProcessModuleSender sends the GetInstanceProcessModule 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) GetInstanceProcessModuleSender(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...) } -// GetInstanceProcessModuleResponder handles the response to the GetInstanceProcessModule request. The method always +// GetDomainOwnershipIdentifierSlotResponder handles the response to the GetDomainOwnershipIdentifierSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetInstanceProcessModuleResponder(resp *http.Response) (result ProcessModuleInfo, err error) { +func (client AppsClient) GetInstanceFunctionSlotResponder(resp *http.Response) (result FunctionEnvelope, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -10545,19 +10554,14 @@ func (client AppsClient) GetInstanceProcessModuleResponder(resp *http.Response) return } -// GetInstanceProcessModuleSlot get process information by its ID for a specific scaled-out instance in a web site. +// GetInstanceMSDeployLog 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 { @@ -10571,39 +10575,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), } @@ -10615,21 +10616,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 +// GetFunctionResponder handles the response to the GetFunction 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(), @@ -10640,18 +10641,15 @@ func (client AppsClient) GetInstanceProcessModuleSlotResponder(resp *http.Respon return } -// GetInstanceProcessSlot get process information by its ID for a specific scaled-out instance in a web site. +// GetInstanceMSDeployLogSlot 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 { @@ -10665,36 +10663,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), @@ -10708,21 +10705,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 +// GetFunctionsAdminTokenResponder handles the response to the GetFunctionsAdminToken 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(), @@ -10733,18 +10730,14 @@ func (client AppsClient) GetInstanceProcessSlotResponder(resp *http.Response) (r return } -// GetInstanceProcessThread get thread information by Thread ID for a specific process, in a specific scaled-out -// instance in a web site. +// GetInstanceMsDeployStatus get the status of the last MSDeploy operation. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// processID - pID. -// threadID - tID. -// 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) GetInstanceProcessThread(ctx context.Context, resourceGroupName string, name string, processID string, threadID string, instanceID string) (result ProcessThreadInfo, err error) { +// 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) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcessThread") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceMsDeployStatus") defer func() { sc := -1 if result.Response.Response != nil { @@ -10758,39 +10751,37 @@ func (client AppsClient) GetInstanceProcessThread(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", "GetInstanceProcessThread", err.Error()) + return result, validation.NewError("web.AppsClient", "GetInstanceMsDeployStatus", err.Error()) } - req, err := client.GetInstanceProcessThreadPreparer(ctx, resourceGroupName, name, processID, threadID, instanceID) + req, err := client.GetInstanceMsDeployStatusPreparer(ctx, resourceGroupName, name, instanceID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessThread", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatus", nil, "Failure preparing request") return } - resp, err := client.GetInstanceProcessThreadSender(req) + resp, err := client.GetInstanceMsDeployStatusSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessThread", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatus", resp, "Failure sending request") return } - result, err = client.GetInstanceProcessThreadResponder(resp) + result, err = client.GetInstanceMsDeployStatusResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessThread", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatus", resp, "Failure responding to request") } return } -// GetInstanceProcessThreadPreparer prepares the GetInstanceProcessThread request. -func (client AppsClient) GetInstanceProcessThreadPreparer(ctx context.Context, resourceGroupName string, name string, processID string, threadID string, instanceID 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), - "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "threadId": autorest.Encode("path", threadID), } const APIVersion = "2018-02-01" @@ -10801,45 +10792,40 @@ func (client AppsClient) GetInstanceProcessThreadPreparer(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}/threads/{threadId}", 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)) } -// GetInstanceProcessThreadSender sends the GetInstanceProcessThread 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) GetInstanceProcessThreadSender(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...) } -// GetInstanceProcessThreadResponder handles the response to the GetInstanceProcessThread request. The method always +// GetFunctionsAdminTokenSlotResponder handles the response to the GetFunctionsAdminTokenSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetInstanceProcessThreadResponder(resp *http.Response) (result ProcessThreadInfo, err error) { +func (client AppsClient) GetInstanceMsDeployStatusResponder(resp *http.Response) (result MSDeployStatus, 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 } -// GetInstanceProcessThreadSlot get thread information by Thread ID for a specific process, in a specific scaled-out -// instance in a web site. +// GetInstanceMsDeployStatusSlot get the status of the last MSDeploy operation. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. -// name - site name. -// processID - pID. -// threadID - tID. -// 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) GetInstanceProcessThreadSlot(ctx context.Context, resourceGroupName string, name string, processID string, threadID string, slot string, instanceID string) (result ProcessThreadInfo, 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) 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.GetInstanceProcessThreadSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceMsDeployStatusSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -10853,40 +10839,38 @@ func (client AppsClient) GetInstanceProcessThreadSlot(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", "GetInstanceProcessThreadSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetInstanceMsDeployStatusSlot", err.Error()) } - req, err := client.GetInstanceProcessThreadSlotPreparer(ctx, resourceGroupName, name, processID, threadID, slot, instanceID) + req, err := client.GetInstanceMsDeployStatusSlotPreparer(ctx, resourceGroupName, name, slot, instanceID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessThreadSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatusSlot", nil, "Failure preparing request") return } - resp, err := client.GetInstanceProcessThreadSlotSender(req) + resp, err := client.GetInstanceMsDeployStatusSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessThreadSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatusSlot", resp, "Failure sending request") return } - result, err = client.GetInstanceProcessThreadSlotResponder(resp) + result, err = client.GetInstanceMsDeployStatusSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessThreadSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatusSlot", resp, "Failure responding to request") } return } -// GetInstanceProcessThreadSlotPreparer prepares the GetInstanceProcessThreadSlot request. -func (client AppsClient) GetInstanceProcessThreadSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, threadID string, slot string, instanceID 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), - "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "threadId": autorest.Encode("path", threadID), } const APIVersion = "2018-02-01" @@ -10897,39 +10881,41 @@ func (client AppsClient) GetInstanceProcessThreadSlotPreparer(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}/threads/{threadId}", 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)) } -// GetInstanceProcessThreadSlotSender sends the GetInstanceProcessThreadSlot 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) GetInstanceProcessThreadSlotSender(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...) } -// GetInstanceProcessThreadSlotResponder handles the response to the GetInstanceProcessThreadSlot request. The method always +// GetHostNameBindingResponder handles the response to the GetHostNameBinding request. The method always // closes the http.Response Body. -func (client AppsClient) GetInstanceProcessThreadSlotResponder(resp *http.Response) (result ProcessThreadInfo, err error) { +func (client AppsClient) GetInstanceMsDeployStatusSlotResponder(resp *http.Response) (result MSDeployStatus, 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 } -// GetMigrateMySQLStatus returns the status of MySql in app migration, if one is active, and whether or not MySql in -// app is enabled +// GetInstanceProcess 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) GetMigrateMySQLStatus(ctx context.Context, resourceGroupName string, name string) (result MigrateMySQLStatus, 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.GetMigrateMySQLStatus") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcess") defer func() { sc := -1 if result.Response.Response != nil { @@ -10943,34 +10929,36 @@ 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", "GetInstanceProcess", err.Error()) } - req, err := client.GetMigrateMySQLStatusPreparer(ctx, resourceGroupName, name) + req, err := client.GetInstanceProcessPreparer(ctx, resourceGroupName, name, processID, instanceID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatus", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcess", nil, "Failure preparing request") return } - resp, err := client.GetMigrateMySQLStatusSender(req) + resp, err := client.GetInstanceProcessSender(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", "GetInstanceProcess", resp, "Failure sending request") return } - result, err = client.GetMigrateMySQLStatusResponder(resp) + result, err = client.GetInstanceProcessResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatus", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcess", 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) { +// 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), } @@ -10983,40 +10971,41 @@ 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}/processes/{processId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetMigrateMySQLStatusSender sends the GetMigrateMySQLStatus 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) GetMigrateMySQLStatusSender(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...) } -// GetMigrateMySQLStatusResponder handles the response to the GetMigrateMySQLStatus request. The method always +// GetHostNameBindingSlotResponder handles the response to the GetHostNameBindingSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetMigrateMySQLStatusResponder(resp *http.Response) (result MigrateMySQLStatus, err error) { +func (client AppsClient) GetInstanceProcessResponder(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 } -// GetMigrateMySQLStatusSlot returns the status of MySql in app migration, if one is active, and whether or not MySql -// in app is enabled +// GetInstanceProcessDump 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 the deployment slot. -func (client AppsClient) GetMigrateMySQLStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result MigrateMySQLStatus, 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.GetMigrateMySQLStatusSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcessDump") defer func() { sc := -1 if result.Response.Response != nil { @@ -11030,36 +11019,37 @@ 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", "GetInstanceProcessDump", err.Error()) } - req, err := client.GetMigrateMySQLStatusSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.GetInstanceProcessDumpPreparer(ctx, resourceGroupName, name, processID, instanceID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatusSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDump", nil, "Failure preparing request") return } - resp, err := client.GetMigrateMySQLStatusSlotSender(req) + resp, err := client.GetInstanceProcessDumpSender(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", "GetInstanceProcessDump", resp, "Failure sending request") return } - result, err = client.GetMigrateMySQLStatusSlotResponder(resp) + result, err = client.GetInstanceProcessDumpResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatusSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDump", 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) { +// 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), } @@ -11071,38 +11061,43 @@ 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}/instances/{instanceId}/processes/{processId}/dump", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetMigrateMySQLStatusSlotSender sends the GetMigrateMySQLStatusSlot 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) GetMigrateMySQLStatusSlotSender(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...) } -// GetMigrateMySQLStatusSlotResponder handles the response to the GetMigrateMySQLStatusSlot request. The method always +// GetHybridConnectionResponder handles the response to the GetHybridConnection request. The method always // closes the http.Response Body. -func (client AppsClient) GetMigrateMySQLStatusSlotResponder(resp *http.Response) (result MigrateMySQLStatus, 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), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound)) result.Response = autorest.Response{Response: resp} return } -// GetMSDeployLog get the MSDeploy Log for the last MSDeploy operation. +// GetInstanceProcessDumpSlot 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) GetMSDeployLog(ctx context.Context, resourceGroupName string, name string) (result MSDeployLog, 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.GetMSDeployLog") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcessDumpSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -11116,35 +11111,38 @@ 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", "GetInstanceProcessDumpSlot", err.Error()) } - req, err := client.GetMSDeployLogPreparer(ctx, resourceGroupName, name) + req, err := client.GetInstanceProcessDumpSlotPreparer(ctx, resourceGroupName, name, processID, slot, instanceID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLog", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDumpSlot", nil, "Failure preparing request") return } - resp, err := client.GetMSDeployLogSender(req) + resp, err := client.GetInstanceProcessDumpSlotSender(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", "GetInstanceProcessDumpSlot", resp, "Failure sending request") return } - result, err = client.GetMSDeployLogResponder(resp) + result, err = client.GetInstanceProcessDumpSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLog", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDumpSlot", 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) { +// 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), } @@ -11156,39 +11154,41 @@ 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}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetMSDeployLogSender sends the GetMSDeployLog 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) GetMSDeployLogSender(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...) } -// GetMSDeployLogResponder handles the response to the GetMSDeployLog request. The method always +// GetHybridConnectionSlotResponder handles the response to the GetHybridConnectionSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetMSDeployLogResponder(resp *http.Response) (result MSDeployLog, 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, http.StatusNotFound), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound)) result.Response = autorest.Response{Response: resp} return } -// GetMSDeployLogSlot get the MSDeploy Log for the last MSDeploy operation. +// GetInstanceProcessModule 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) GetMSDeployLogSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result MSDeployLog, 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.GetMSDeployLogSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcessModule") defer func() { sc := -1 if result.Response.Response != nil { @@ -11202,36 +11202,38 @@ 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", "GetInstanceProcessModule", err.Error()) } - req, err := client.GetMSDeployLogSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.GetInstanceProcessModulePreparer(ctx, resourceGroupName, name, processID, baseAddress, instanceID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLogSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModule", nil, "Failure preparing request") return } - resp, err := client.GetMSDeployLogSlotSender(req) + resp, err := client.GetInstanceProcessModuleSender(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", "GetInstanceProcessModule", resp, "Failure sending request") return } - result, err = client.GetMSDeployLogSlotResponder(resp) + result, err = client.GetInstanceProcessModuleResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLogSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModule", 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) { +// 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), } @@ -11243,21 +11245,21 @@ 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}/modules/{baseAddress}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetMSDeployLogSlotSender sends the GetMSDeployLogSlot 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) GetMSDeployLogSlotSender(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...) } -// GetMSDeployLogSlotResponder handles the response to the GetMSDeployLogSlot request. The method always +// GetInstanceFunctionSlotResponder handles the response to the GetInstanceFunctionSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetMSDeployLogSlotResponder(resp *http.Response) (result MSDeployLog, err error) { +func (client AppsClient) GetInstanceProcessModuleResponder(resp *http.Response) (result ProcessModuleInfo, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -11268,13 +11270,19 @@ func (client AppsClient) GetMSDeployLogSlotResponder(resp *http.Response) (resul return } -// GetMSDeployStatus get the status of the last MSDeploy operation. +// GetInstanceProcessModuleSlot 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) GetMSDeployStatus(ctx context.Context, resourceGroupName string, name string) (result MSDeployStatus, 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.GetMSDeployStatus") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcessModuleSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -11288,35 +11296,39 @@ 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", "GetInstanceProcessModuleSlot", err.Error()) } - req, err := client.GetMSDeployStatusPreparer(ctx, resourceGroupName, name) + req, err := client.GetInstanceProcessModuleSlotPreparer(ctx, resourceGroupName, name, processID, baseAddress, slot, instanceID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatus", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModuleSlot", nil, "Failure preparing request") return } - resp, err := client.GetMSDeployStatusSender(req) + resp, err := client.GetInstanceProcessModuleSlotSender(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", "GetInstanceProcessModuleSlot", resp, "Failure sending request") return } - result, err = client.GetMSDeployStatusResponder(resp) + result, err = client.GetInstanceProcessModuleSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatus", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModuleSlot", 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) { +// 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), + "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -11328,39 +11340,43 @@ 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}/modules/{baseAddress}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetMSDeployStatusSender sends the GetMSDeployStatus 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) GetMSDeployStatusSender(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...) } -// GetMSDeployStatusResponder handles the response to the GetMSDeployStatus request. The method always +// GetInstanceMSDeployLogResponder handles the response to the GetInstanceMSDeployLog request. The method always // closes the http.Response Body. -func (client AppsClient) GetMSDeployStatusResponder(resp *http.Response) (result MSDeployStatus, err error) { +func (client AppsClient) GetInstanceProcessModuleSlotResponder(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 } -// GetMSDeployStatusSlot get the status of the last MSDeploy operation. +// GetInstanceProcessSlot 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. +// 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) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetMSDeployStatusSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcessSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -11374,34 +11390,36 @@ 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", "GetInstanceProcessSlot", err.Error()) } - req, err := client.GetMSDeployStatusSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.GetInstanceProcessSlotPreparer(ctx, resourceGroupName, name, processID, slot, instanceID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatusSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessSlot", nil, "Failure preparing request") return } - resp, err := client.GetMSDeployStatusSlotSender(req) + resp, err := client.GetInstanceProcessSlotSender(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", "GetInstanceProcessSlot", resp, "Failure sending request") return } - result, err = client.GetMSDeployStatusSlotResponder(resp) + result, err = client.GetInstanceProcessSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatusSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessSlot", 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) { +// 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), + "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -11415,39 +11433,43 @@ 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}/slots/{slot}/instances/{instanceId}/processes/{processId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetMSDeployStatusSlotSender sends the GetMSDeployStatusSlot 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) GetMSDeployStatusSlotSender(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...) } -// GetMSDeployStatusSlotResponder handles the response to the GetMSDeployStatusSlot request. The method always +// GetInstanceProcessSlotResponder handles the response to the GetInstanceProcessSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetMSDeployStatusSlotResponder(resp *http.Response) (result MSDeployStatus, err error) { +func (client AppsClient) GetInstanceProcessSlotResponder(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 } -// GetNetworkTraceOperation gets a named operation for a network trace capturing (or deployment slot, if specified). +// GetInstanceProcessThread get thread information by Thread ID for a specific process, in 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. +// threadID - tID. +// 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) GetInstanceProcessThread(ctx context.Context, resourceGroupName string, name string, processID string, threadID string, instanceID string) (result ProcessThreadInfo, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTraceOperation") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcessThread") defer func() { sc := -1 if result.Response.Response != nil { @@ -11461,37 +11483,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", "GetInstanceProcessThread", err.Error()) } - req, err := client.GetNetworkTraceOperationPreparer(ctx, resourceGroupName, name, operationID) + req, err := client.GetInstanceProcessThreadPreparer(ctx, resourceGroupName, name, processID, threadID, instanceID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperation", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessThread", nil, "Failure preparing request") return } - resp, err := client.GetNetworkTraceOperationSender(req) + resp, err := client.GetInstanceProcessThreadSender(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", "GetInstanceProcessThread", resp, "Failure sending request") return } - result, err = client.GetNetworkTraceOperationResponder(resp) + result, err = client.GetInstanceProcessThreadResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperation", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessThread", 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) { +// GetInstanceProcessThreadPreparer prepares the GetInstanceProcessThread request. +func (client AppsClient) GetInstanceProcessThreadPreparer(ctx context.Context, resourceGroupName string, name string, processID string, threadID 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), "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "threadId": autorest.Encode("path", threadID), } const APIVersion = "2018-02-01" @@ -11502,42 +11526,45 @@ 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}/instances/{instanceId}/processes/{processId}/threads/{threadId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetNetworkTraceOperationSender sends the GetNetworkTraceOperation request. The method will close the +// GetInstanceProcessThreadSender sends the GetInstanceProcessThread 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) GetInstanceProcessThreadSender(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 +// GetInstanceMsDeployStatusResponder handles the response to the GetInstanceMsDeployStatus request. The method always // closes the http.Response Body. -func (client AppsClient) GetNetworkTraceOperationResponder(resp *http.Response) (result ListNetworkTrace, err error) { +func (client AppsClient) GetInstanceProcessThreadResponder(resp *http.Response) (result ProcessThreadInfo, 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 gets a named operation for a network trace capturing (or deployment slot, if -// specified). +// GetInstanceProcessThreadSlot get thread information by Thread ID for a specific process, in 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. +// threadID - tID. +// 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) GetInstanceProcessThreadSlot(ctx context.Context, resourceGroupName string, name string, processID string, threadID string, slot string, instanceID string) (result ProcessThreadInfo, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTraceOperationSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcessThreadSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -11551,38 +11578,40 @@ 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", "GetInstanceProcessThreadSlot", err.Error()) } - req, err := client.GetNetworkTraceOperationSlotPreparer(ctx, resourceGroupName, name, operationID, slot) + req, err := client.GetInstanceProcessThreadSlotPreparer(ctx, resourceGroupName, name, processID, threadID, slot, instanceID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessThreadSlot", nil, "Failure preparing request") return } - resp, err := client.GetNetworkTraceOperationSlotSender(req) + resp, err := client.GetInstanceProcessThreadSlotSender(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", "GetInstanceProcessThreadSlot", resp, "Failure sending request") return } - result, err = client.GetNetworkTraceOperationSlotResponder(resp) + result, err = client.GetInstanceProcessThreadSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessThreadSlot", 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) { +// GetInstanceProcessThreadSlotPreparer prepares the GetInstanceProcessThreadSlot request. +func (client AppsClient) GetInstanceProcessThreadSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, threadID 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), + "threadId": autorest.Encode("path", threadID), } const APIVersion = "2018-02-01" @@ -11593,42 +11622,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}/threads/{threadId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetNetworkTraceOperationSlotSender sends the GetNetworkTraceOperationSlot request. The method will close the +// GetInstanceProcessThreadSlotSender sends the GetInstanceProcessThreadSlot 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) GetInstanceProcessThreadSlotSender(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 +// GetInstanceMsDeployStatusSlotResponder handles the response to the GetInstanceMsDeployStatusSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetNetworkTraceOperationSlotResponder(resp *http.Response) (result ListNetworkTrace, err error) { +func (client AppsClient) GetInstanceProcessThreadSlotResponder(resp *http.Response) (result ProcessThreadInfo, 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 gets a named operation for a network trace capturing (or deployment slot, if -// specified). +// GetMigrateMySQLStatus 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 { @@ -11642,37 +11668,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), } @@ -11684,39 +11708,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 +// GetInstanceProcessResponder handles the response to the GetInstanceProcess 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 gets a named operation for a network trace capturing (or deployment slot, if specified). +// GetMigrateMySQLStatusSlot 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 { @@ -11730,36 +11755,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), } @@ -11771,39 +11796,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 +// GetInstanceProcessDumpResponder handles the response to the GetInstanceProcessDump 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 gets a named operation for a network trace capturing (or deployment slot, if specified). +// GetMSDeployLog 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 { @@ -11817,35 +11841,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), } @@ -11858,41 +11881,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 +// GetInstanceProcessDumpSlotResponder handles the response to the GetInstanceProcessDumpSlot 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 gets a named operation for a network trace capturing (or deployment slot, if specified). +// GetMSDeployLogSlot 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 { @@ -11906,35 +11927,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), @@ -11948,41 +11968,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 +// GetInstanceProcessModuleResponder handles the response to the GetInstanceProcessModule 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 gets a named operation for a network trace capturing (or deployment slot, if specified). +// GetMSDeployStatus 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 { @@ -11996,37 +12013,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), } @@ -12038,39 +12053,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 +// GetInstanceProcessModuleSlotResponder handles the response to the GetInstanceProcessModuleSlot 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 gets a named operation for a network trace capturing (or deployment slot, if specified). +// GetMSDeployStatusSlot 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 { @@ -12084,36 +12099,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), } @@ -12125,39 +12140,39 @@ 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 +// GetInstanceProcessSlotResponder handles the response to the GetInstanceProcessSlot 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 gets a named add-on of an app. +// GetNetworkTraceOperation 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 { @@ -12171,35 +12186,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), } @@ -12212,41 +12227,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 +// GetInstanceProcessThreadResponder handles the response to the GetInstanceProcessThread 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 gets a named add-on of an app. +// GetNetworkTraceOperationSlot 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 { @@ -12260,35 +12276,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), @@ -12302,39 +12318,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 +// GetInstanceProcessThreadSlotResponder handles the response to the GetInstanceProcessThreadSlot 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 gets data around private site access enablement and authorized Virtual Networks that can access the -// site. +// GetNetworkTraceOperationSlotV2 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 { @@ -12348,35 +12367,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), } @@ -12388,40 +12409,39 @@ 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 +// GetMigrateMySQLStatusResponder handles the response to the GetMigrateMySQLStatus 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 gets data around private site access enablement and authorized Virtual Networks that can access -// the site. +// GetNetworkTraceOperationV2 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 { @@ -12435,36 +12455,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), } @@ -12476,39 +12496,39 @@ 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 +// GetMigrateMySQLStatusSlotResponder handles the response to the GetMigrateMySQLStatusSlot 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 get process information by its ID for a specific scaled-out instance in a web site. +// GetNetworkTraces 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 { @@ -12522,35 +12542,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), } @@ -12563,39 +12583,41 @@ 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 +// GetMSDeployLogResponder handles the response to the GetMSDeployLog 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 get a memory dump of a process by its ID for a specific scaled-out instance in a web site. +// GetNetworkTracesSlot 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 { @@ -12609,36 +12631,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), } @@ -12650,40 +12673,41 @@ 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 +// GetMSDeployLogSlotResponder handles the response to the GetMSDeployLogSlot 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 get a memory dump of a process by its ID for a specific scaled-out instance in a web site. +// GetNetworkTracesSlotV2 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 { @@ -12697,35 +12721,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), @@ -12739,39 +12763,39 @@ 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 +// GetMSDeployStatusResponder handles the response to the GetMSDeployStatus 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 get process information by its ID for a specific scaled-out instance in a web site. +// GetNetworkTracesV2 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 { @@ -12785,36 +12809,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), } @@ -12827,42 +12850,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 +// GetMSDeployStatusSlotResponder handles the response to the GetMSDeployStatusSlot 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 get process information by its ID for a specific scaled-out instance in a web site. +// GetPremierAddOn 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 { @@ -12876,38 +12896,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), } @@ -12919,41 +12937,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 +// GetNetworkTraceOperationResponder handles the response to the GetNetworkTraceOperation 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 get process information by its ID for a specific scaled-out instance in a web site. +// GetPremierAddOnSlot 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 { @@ -12967,35 +12985,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), @@ -13009,41 +13027,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 +// GetNetworkTraceOperationSlotResponder handles the response to the GetNetworkTraceOperationSlot 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 } -// GetProcessThread get thread information by Thread ID for a specific process, in a specific scaled-out instance in a -// web site. +// GetPrivateAccess 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 - site name. -// processID - pID. -// threadID - tID. -func (client AppsClient) GetProcessThread(ctx context.Context, resourceGroupName string, name string, processID string, threadID string) (result ProcessThreadInfo, 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.GetProcessThread") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPrivateAccess") defer func() { sc := -1 if result.Response.Response != nil { @@ -13057,38 +13073,36 @@ func (client AppsClient) GetProcessThread(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", "GetProcessThread", err.Error()) + return result, validation.NewError("web.AppsClient", "GetPrivateAccess", err.Error()) } - req, err := client.GetProcessThreadPreparer(ctx, resourceGroupName, name, processID, threadID) + req, err := client.GetPrivateAccessPreparer(ctx, resourceGroupName, name) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessThread", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateAccess", nil, "Failure preparing request") return } - resp, err := client.GetProcessThreadSender(req) + resp, err := client.GetPrivateAccessSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessThread", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateAccess", resp, "Failure sending request") return } - result, err = client.GetProcessThreadResponder(resp) + result, err = client.GetPrivateAccessResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessThread", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateAccess", resp, "Failure responding to request") } return } -// GetProcessThreadPreparer prepares the GetProcessThread request. -func (client AppsClient) GetProcessThreadPreparer(ctx context.Context, resourceGroupName string, name string, processID string, threadID 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), - "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "threadId": autorest.Encode("path", threadID), } const APIVersion = "2018-02-01" @@ -13099,43 +13113,40 @@ func (client AppsClient) GetProcessThreadPreparer(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}/threads/{threadId}", 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)) } -// GetProcessThreadSender sends the GetProcessThread 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) GetProcessThreadSender(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...) } -// GetProcessThreadResponder handles the response to the GetProcessThread request. The method always +// GetNetworkTraceOperationSlotV2Responder handles the response to the GetNetworkTraceOperationSlotV2 request. The method always // closes the http.Response Body. -func (client AppsClient) GetProcessThreadResponder(resp *http.Response) (result ProcessThreadInfo, err error) { +func (client AppsClient) GetPrivateAccessResponder(resp *http.Response) (result PrivateAccess, 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 } -// GetProcessThreadSlot get thread information by Thread ID for a specific process, in a specific scaled-out instance -// in a web site. +// GetPrivateAccessSlot 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 - site name. -// processID - pID. -// threadID - tID. -// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the -// production slot. -func (client AppsClient) GetProcessThreadSlot(ctx context.Context, resourceGroupName string, name string, processID string, threadID string, slot string) (result ProcessThreadInfo, 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.GetProcessThreadSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPrivateAccessSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -13149,39 +13160,37 @@ func (client AppsClient) GetProcessThreadSlot(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", "GetProcessThreadSlot", err.Error()) + return result, validation.NewError("web.AppsClient", "GetPrivateAccessSlot", err.Error()) } - req, err := client.GetProcessThreadSlotPreparer(ctx, resourceGroupName, name, processID, threadID, slot) + req, err := client.GetPrivateAccessSlotPreparer(ctx, resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessThreadSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateAccessSlot", nil, "Failure preparing request") return } - resp, err := client.GetProcessThreadSlotSender(req) + resp, err := client.GetPrivateAccessSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessThreadSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateAccessSlot", resp, "Failure sending request") return } - result, err = client.GetProcessThreadSlotResponder(resp) + result, err = client.GetPrivateAccessSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessThreadSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateAccessSlot", resp, "Failure responding to request") } return } -// GetProcessThreadSlotPreparer prepares the GetProcessThreadSlot request. -func (client AppsClient) GetProcessThreadSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, threadID string, slot 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), - "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "threadId": autorest.Encode("path", threadID), } const APIVersion = "2018-02-01" @@ -13192,39 +13201,39 @@ func (client AppsClient) GetProcessThreadSlotPreparer(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}/threads/{threadId}", 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)) } -// GetProcessThreadSlotSender sends the GetProcessThreadSlot 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) GetProcessThreadSlotSender(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...) } -// GetProcessThreadSlotResponder handles the response to the GetProcessThreadSlot request. The method always +// GetNetworkTraceOperationV2Responder handles the response to the GetNetworkTraceOperationV2 request. The method always // closes the http.Response Body. -func (client AppsClient) GetProcessThreadSlotResponder(resp *http.Response) (result ProcessThreadInfo, err error) { +func (client AppsClient) GetPrivateAccessSlotResponder(resp *http.Response) (result PrivateAccess, 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 get the named public certificate for an app (or deployment slot, if specified). +// GetProcess 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. -// publicCertificateName - public certificate name. -func (client AppsClient) GetPublicCertificate(ctx context.Context, resourceGroupName string, name string, publicCertificateName string) (result PublicCertificate, 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.GetPublicCertificate") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcess") defer func() { sc := -1 if result.Response.Response != nil { @@ -13238,37 +13247,37 @@ 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", "GetProcess", err.Error()) } - req, err := client.GetPublicCertificatePreparer(ctx, resourceGroupName, name, publicCertificateName) + req, err := client.GetProcessPreparer(ctx, resourceGroupName, name, processID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificate", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcess", nil, "Failure preparing request") return } - resp, err := client.GetPublicCertificateSender(req) + resp, err := client.GetProcessSender(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", "GetProcess", resp, "Failure sending request") return } - result, err = client.GetPublicCertificateResponder(resp) + result, err = client.GetProcessResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificate", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcess", 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) { +// 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{}{ - "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), + "processId": autorest.Encode("path", processID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2018-02-01" @@ -13279,41 +13288,39 @@ 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}/processes/{processId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetPublicCertificateSender sends the GetPublicCertificate 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) GetPublicCertificateSender(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...) } -// GetPublicCertificateResponder handles the response to the GetPublicCertificate request. The method always +// GetNetworkTracesResponder handles the response to the GetNetworkTraces request. The method always // closes the http.Response Body. -func (client AppsClient) GetPublicCertificateResponder(resp *http.Response) (result PublicCertificate, 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 } -// GetPublicCertificateSlot get the named public certificate for an app (or deployment slot, if specified). +// GetProcessDump 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. -// 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 - 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.GetPublicCertificateSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcessDump") defer func() { sc := -1 if result.Response.Response != nil { @@ -13327,38 +13334,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", "GetProcessDump", err.Error()) } - req, err := client.GetPublicCertificateSlotPreparer(ctx, resourceGroupName, name, slot, publicCertificateName) + req, err := client.GetProcessDumpPreparer(ctx, resourceGroupName, name, processID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificateSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDump", nil, "Failure preparing request") return } - resp, err := client.GetPublicCertificateSlotSender(req) + resp, err := client.GetProcessDumpSender(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", "GetProcessDump", resp, "Failure sending request") return } - result, err = client.GetPublicCertificateSlotResponder(resp) + result, err = client.GetProcessDumpResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificateSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDump", 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) { +// 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{}{ - "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), + "processId": autorest.Encode("path", processID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2018-02-01" @@ -13369,39 +13375,40 @@ 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}/processes/{processId}/dump", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetPublicCertificateSlotSender sends the GetPublicCertificateSlot 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) GetPublicCertificateSlotSender(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...) } -// GetPublicCertificateSlotResponder handles the response to the GetPublicCertificateSlot request. The method always +// GetNetworkTracesSlotResponder handles the response to the GetNetworkTracesSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetPublicCertificateSlotResponder(resp *http.Response) (result PublicCertificate, 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 } -// GetRelayServiceConnection gets a hybrid connection configuration by its name. +// GetProcessDumpSlot 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. -func (client AppsClient) GetRelayServiceConnection(ctx context.Context, resourceGroupName string, name string, entityName string) (result RelayServiceConnectionEntity, 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) 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.GetRelayServiceConnection") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcessDumpSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -13415,36 +13422,37 @@ 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", "GetProcessDumpSlot", err.Error()) } - req, err := client.GetRelayServiceConnectionPreparer(ctx, resourceGroupName, name, entityName) + req, err := client.GetProcessDumpSlotPreparer(ctx, resourceGroupName, name, processID, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetRelayServiceConnection", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDumpSlot", nil, "Failure preparing request") return } - resp, err := client.GetRelayServiceConnectionSender(req) + resp, err := client.GetProcessDumpSlotSender(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", "GetProcessDumpSlot", resp, "Failure sending request") return } - result, err = client.GetRelayServiceConnectionResponder(resp) + result, err = client.GetProcessDumpSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetRelayServiceConnection", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDumpSlot", 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) { +// 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{}{ - "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), } @@ -13456,41 +13464,39 @@ 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}/slots/{slot}/processes/{processId}/dump", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetRelayServiceConnectionSender sends the GetRelayServiceConnection 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) GetRelayServiceConnectionSender(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...) } -// GetRelayServiceConnectionResponder handles the response to the GetRelayServiceConnection request. The method always +// GetNetworkTracesSlotV2Responder handles the response to the GetNetworkTracesSlotV2 request. The method always // closes the http.Response Body. -func (client AppsClient) GetRelayServiceConnectionResponder(resp *http.Response) (result RelayServiceConnectionEntity, 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), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound)) result.Response = autorest.Response{Response: resp} return } -// GetRelayServiceConnectionSlot gets a hybrid connection configuration by its name. +// GetProcessModule 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. -// 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. +// 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.GetRelayServiceConnectionSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcessModule") defer func() { sc := -1 if result.Response.Response != nil { @@ -13504,37 +13510,37 @@ 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", "GetProcessModule", err.Error()) } - req, err := client.GetRelayServiceConnectionSlotPreparer(ctx, resourceGroupName, name, entityName, slot) + req, err := client.GetProcessModulePreparer(ctx, resourceGroupName, name, processID, baseAddress) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetRelayServiceConnectionSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModule", nil, "Failure preparing request") return } - resp, err := client.GetRelayServiceConnectionSlotSender(req) + resp, err := client.GetProcessModuleSender(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", "GetProcessModule", resp, "Failure sending request") return } - result, err = client.GetRelayServiceConnectionSlotResponder(resp) + result, err = client.GetProcessModuleResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetRelayServiceConnectionSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModule", 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) { +// 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{}{ - "entityName": autorest.Encode("path", entityName), + "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), } @@ -13546,39 +13552,42 @@ 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}/modules/{baseAddress}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetRelayServiceConnectionSlotSender sends the GetRelayServiceConnectionSlot 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) GetRelayServiceConnectionSlotSender(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...) } -// GetRelayServiceConnectionSlotResponder handles the response to the GetRelayServiceConnectionSlot request. The method always +// GetNetworkTracesV2Responder handles the response to the GetNetworkTracesV2 request. The method always // closes the http.Response Body. -func (client AppsClient) GetRelayServiceConnectionSlotResponder(resp *http.Response) (result RelayServiceConnectionEntity, err error) { +func (client AppsClient) GetProcessModuleResponder(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 } -// GetSiteExtension get site extension information by its ID for a web site, or a deployment slot. +// GetProcessModuleSlot 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. -func (client AppsClient) GetSiteExtension(ctx context.Context, resourceGroupName string, name string, siteExtensionID string) (result SiteExtensionInfo, err error) { +// 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.GetSiteExtension") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcessModuleSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -13592,36 +13601,38 @@ 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", "GetProcessModuleSlot", err.Error()) } - req, err := client.GetSiteExtensionPreparer(ctx, resourceGroupName, name, siteExtensionID) + req, err := client.GetProcessModuleSlotPreparer(ctx, resourceGroupName, name, processID, baseAddress, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtension", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModuleSlot", nil, "Failure preparing request") return } - resp, err := client.GetSiteExtensionSender(req) + resp, err := client.GetProcessModuleSlotSender(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", "GetProcessModuleSlot", resp, "Failure sending request") return } - result, err = client.GetSiteExtensionResponder(resp) + result, err = client.GetProcessModuleSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtension", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModuleSlot", 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) { +// 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), - "siteExtensionId": autorest.Encode("path", siteExtensionID), + "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -13633,21 +13644,21 @@ 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}/modules/{baseAddress}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetSiteExtensionSender sends the GetSiteExtension 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) GetSiteExtensionSender(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...) } -// GetSiteExtensionResponder handles the response to the GetSiteExtension request. The method always +// GetPremierAddOnResponder handles the response to the GetPremierAddOn request. The method always // closes the http.Response Body. -func (client AppsClient) GetSiteExtensionResponder(resp *http.Response) (result SiteExtensionInfo, err error) { +func (client AppsClient) GetProcessModuleSlotResponder(resp *http.Response) (result ProcessModuleInfo, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -13658,16 +13669,16 @@ func (client AppsClient) GetSiteExtensionResponder(resp *http.Response) (result return } -// GetSiteExtensionSlot get site extension information by its ID for a web site, or a deployment slot. +// GetProcessSlot 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 deletes a deployment for the +// 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) GetSiteExtensionSlot(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string) (result SiteExtensionInfo, err error) { +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.GetSiteExtensionSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcessSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -13681,36 +13692,36 @@ 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", "GetProcessSlot", err.Error()) } - req, err := client.GetSiteExtensionSlotPreparer(ctx, resourceGroupName, name, siteExtensionID, slot) + req, err := client.GetProcessSlotPreparer(ctx, resourceGroupName, name, processID, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtensionSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessSlot", nil, "Failure preparing request") return } - resp, err := client.GetSiteExtensionSlotSender(req) + resp, err := client.GetProcessSlotSender(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", "GetProcessSlot", resp, "Failure sending request") return } - result, err = client.GetSiteExtensionSlotResponder(resp) + result, err = client.GetProcessSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtensionSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessSlot", 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) { +// 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), - "siteExtensionId": autorest.Encode("path", siteExtensionID), "slot": autorest.Encode("path", slot), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -13723,21 +13734,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}/slots/{slot}/processes/{processId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetSiteExtensionSlotSender sends the GetSiteExtensionSlot 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) GetSiteExtensionSlotSender(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...) } -// GetSiteExtensionSlotResponder handles the response to the GetSiteExtensionSlot request. The method always +// GetPremierAddOnSlotResponder handles the response to the GetPremierAddOnSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetSiteExtensionSlotResponder(resp *http.Response) (result SiteExtensionInfo, err error) { +func (client AppsClient) GetProcessSlotResponder(resp *http.Response) (result ProcessInfo, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -13748,13 +13759,16 @@ func (client AppsClient) GetSiteExtensionSlotResponder(resp *http.Response) (res return } -// GetSitePhpErrorLogFlag gets web app's event logs. +// GetProcessThread get thread information by Thread ID for a specific process, in 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. +// threadID - tID. +func (client AppsClient) GetProcessThread(ctx context.Context, resourceGroupName string, name string, processID string, threadID string) (result ProcessThreadInfo, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSitePhpErrorLogFlag") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcessThread") defer func() { sc := -1 if result.Response.Response != nil { @@ -13768,36 +13782,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", "GetProcessThread", err.Error()) } - req, err := client.GetSitePhpErrorLogFlagPreparer(ctx, resourceGroupName, name) + req, err := client.GetProcessThreadPreparer(ctx, resourceGroupName, name, processID, threadID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSitePhpErrorLogFlag", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessThread", nil, "Failure preparing request") return } - resp, err := client.GetSitePhpErrorLogFlagSender(req) + resp, err := client.GetProcessThreadSender(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", "GetProcessThread", resp, "Failure sending request") return } - result, err = client.GetSitePhpErrorLogFlagResponder(resp) + result, err = client.GetProcessThreadResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSitePhpErrorLogFlag", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessThread", 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) { - pathParameters := map[string]interface{}{ +// GetProcessThreadPreparer prepares the GetProcessThread request. +func (client AppsClient) GetProcessThreadPreparer(ctx context.Context, resourceGroupName string, name string, processID string, threadID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "threadId": autorest.Encode("path", threadID), } const APIVersion = "2018-02-01" @@ -13808,39 +13824,43 @@ 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}/processes/{processId}/threads/{threadId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetSitePhpErrorLogFlagSender sends the GetSitePhpErrorLogFlag request. The method will close the +// GetProcessThreadSender sends the GetProcessThread 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) GetProcessThreadSender(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 +// GetPrivateAccessResponder handles the response to the GetPrivateAccess request. The method always // closes the http.Response Body. -func (client AppsClient) GetSitePhpErrorLogFlagResponder(resp *http.Response) (result SitePhpErrorLogFlag, err error) { +func (client AppsClient) GetProcessThreadResponder(resp *http.Response) (result ProcessThreadInfo, 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 gets web app's event logs. +// GetProcessThreadSlot get thread information by Thread ID for a specific process, in 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. +// threadID - tID. +// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the +// production slot. +func (client AppsClient) GetProcessThreadSlot(ctx context.Context, resourceGroupName string, name string, processID string, threadID string, slot string) (result ProcessThreadInfo, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSitePhpErrorLogFlagSlot") + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcessThreadSlot") defer func() { sc := -1 if result.Response.Response != nil { @@ -13854,37 +13874,39 @@ 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", "GetProcessThreadSlot", err.Error()) } - req, err := client.GetSitePhpErrorLogFlagSlotPreparer(ctx, resourceGroupName, name, slot) + req, err := client.GetProcessThreadSlotPreparer(ctx, resourceGroupName, name, processID, threadID, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSitePhpErrorLogFlagSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessThreadSlot", nil, "Failure preparing request") return } - resp, err := client.GetSitePhpErrorLogFlagSlotSender(req) + resp, err := client.GetProcessThreadSlotSender(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", "GetProcessThreadSlot", resp, "Failure sending request") return } - result, err = client.GetSitePhpErrorLogFlagSlotResponder(resp) + result, err = client.GetProcessThreadSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSitePhpErrorLogFlagSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessThreadSlot", 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) { +// GetProcessThreadSlotPreparer prepares the GetProcessThreadSlot request. +func (client AppsClient) GetProcessThreadSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, threadID 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), + "threadId": autorest.Encode("path", threadID), } const APIVersion = "2018-02-01" @@ -13895,39 +13917,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}/threads/{threadId}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// GetSitePhpErrorLogFlagSlotSender sends the GetSitePhpErrorLogFlagSlot request. The method will close the +// GetProcessThreadSlotSender sends the GetProcessThreadSlot 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) GetProcessThreadSlotSender(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 +// GetPrivateAccessSlotResponder handles the response to the GetPrivateAccessSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetSitePhpErrorLogFlagSlotResponder(resp *http.Response) (result SitePhpErrorLogFlag, err error) { +func (client AppsClient) GetProcessThreadSlotResponder(resp *http.Response) (result ProcessThreadInfo, 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 gets the details of a web, mobile, or API app. +// GetPublicCertificate 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 { @@ -13941,37 +13963,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 = "2018-02-01" @@ -13982,38 +14004,41 @@ 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 +// GetProcessResponder handles the response to the GetProcess 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 gets the source control configuration of an app. +// GetPublicCertificateSlot 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 { @@ -14027,36 +14052,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 = "2018-02-01" @@ -14067,40 +14094,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 +// GetProcessDumpResponder handles the response to the GetProcessDump 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 gets the source control configuration of an app. +// GetRelayServiceConnection 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 { @@ -14114,36 +14140,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), } @@ -14155,38 +14181,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 +// GetProcessDumpSlotResponder handles the response to the GetProcessDumpSlot 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 gets a Swift Virtual Network connection. +// GetRelayServiceConnectionSlot 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 { @@ -14200,35 +14229,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), } @@ -14240,21 +14271,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 +// GetProcessModuleResponder handles the response to the GetProcessModule 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(), @@ -14265,15 +14296,14 @@ func (client AppsClient) GetSwiftVirtualNetworkConnectionResponder(resp *http.Re return } -// GetSwiftVirtualNetworkConnectionSlot gets a Swift Virtual Network connection. +// GetSiteExtension 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 { @@ -14287,36 +14317,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), } @@ -14328,39 +14358,41 @@ 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 +// GetProcessModuleSlotResponder handles the response to the GetProcessModuleSlot 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 gets a triggered web job by its ID for an app, or a deployment slot. +// GetSiteExtensionSlot 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 deletes a deployment for 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 { @@ -14374,37 +14406,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 = "2018-02-01" @@ -14415,21 +14448,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 +// GetProcessSlotResponder handles the response to the GetProcessSlot 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(), @@ -14440,15 +14473,13 @@ func (client AppsClient) GetTriggeredWebJobResponder(resp *http.Response) (resul return } -// GetTriggeredWebJobHistory gets a triggered web job's history by its ID for an app, , or a deployment slot. +// GetSitePhpErrorLogFlag 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 { @@ -14462,38 +14493,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 = "2018-02-01" @@ -14504,42 +14533,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 +// GetProcessThreadResponder handles the response to the GetProcessThread 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 gets a triggered web job's history by its ID for an app, , or a deployment slot. +// GetSitePhpErrorLogFlagSlot 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 deletes a deployment for 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 { @@ -14553,39 +14579,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 = "2018-02-01" @@ -14596,41 +14620,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 +// GetProcessThreadSlotResponder handles the response to the GetProcessThreadSlot 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 gets a triggered web job by its ID for an app, or a deployment slot. +// GetSlot 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 deletes a deployment for 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 { @@ -14644,38 +14666,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 = "2018-02-01" @@ -14686,21 +14707,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 +// GetPublicCertificateResponder handles the response to the GetPublicCertificate 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(), @@ -14711,14 +14732,13 @@ func (client AppsClient) GetTriggeredWebJobSlotResponder(resp *http.Response) (r return } -// GetVnetConnection gets a virtual network the app (or deployment slot) is connected to by name. +// GetSourceControl 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 { @@ -14732,37 +14752,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 = "2018-02-01" @@ -14773,40 +14792,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 +// GetPublicCertificateSlotResponder handles the response to the GetPublicCertificateSlot 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 gets an app's Virtual Network gateway. +// GetSourceControlSlot 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 { @@ -14820,38 +14839,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 = "2018-02-01" @@ -14862,42 +14880,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 +// GetRelayServiceConnectionResponder handles the response to the GetRelayServiceConnection 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 gets an app's Virtual Network gateway. +// GetSwiftVirtualNetworkConnection 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 { @@ -14911,39 +14925,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 = "2018-02-01" @@ -14954,41 +14965,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 +// GetRelayServiceConnectionSlotResponder handles the response to the GetRelayServiceConnectionSlot 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 gets a virtual network the app (or deployment slot) is connected to by name. +// GetSwiftVirtualNetworkConnectionSlot 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 { @@ -15002,38 +15012,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 = "2018-02-01" @@ -15044,21 +15053,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 +// GetSiteExtensionResponder handles the response to the GetSiteExtension 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(), @@ -15069,14 +15078,14 @@ func (client AppsClient) GetVnetConnectionSlotResponder(resp *http.Response) (re return } -// GetWebJob get webjob information for an app, or a deployment slot. +// GetTriggeredWebJob 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 { @@ -15090,32 +15099,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), @@ -15131,41 +15140,40 @@ 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 get webjob information for an app, or a deployment slot. +// GetTriggeredWebJobHistory 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 { @@ -15179,36 +15187,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), } @@ -15221,38 +15229,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 +// GetSitePhpErrorLogFlagResponder handles the response to the GetSitePhpErrorLogFlag 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 gets the last lines of docker logs for the given site +// GetTriggeredWebJobHistorySlot 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 deletes a deployment for 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 { @@ -15266,36 +15278,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 = "2018-02-01" @@ -15304,40 +15319,43 @@ 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 +// GetSitePhpErrorLogFlagSlotResponder handles the response to the GetSitePhpErrorLogFlagSlot 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 gets the last lines of docker logs for the given site +// GetTriggeredWebJobSlot 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 deletes a deployment for 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 { @@ -15351,37 +15369,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 = "2018-02-01" @@ -15390,44 +15409,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 +// GetSlotResponder handles the response to the GetSlot 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 install site extension on a web site, or a deployment slot. +// GetVnetConnection 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) }() @@ -15437,31 +15457,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 = "2018-02-01" @@ -15470,53 +15496,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 +// GetSourceControlResponder handles the response to the GetSourceControl 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 install site extension on a web site, or a deployment slot. +// GetVnetConnectionGateway 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 deletes a deployment for 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) }() @@ -15526,32 +15545,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 = "2018-02-01" @@ -15560,46 +15585,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 +// GetSourceControlSlotResponder handles the response to the GetSourceControlSlot 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 shows whether an app can be cloned to another resource group or subscription. +// GetVnetConnectionGatewaySlot 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 { @@ -15613,36 +15636,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 = "2018-02-01" @@ -15651,41 +15677,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 +// GetSwiftVirtualNetworkConnectionResponder handles the response to the GetSwiftVirtualNetworkConnection 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 shows whether an app can be cloned to another resource group or subscription. +// GetVnetConnectionSlot 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 { @@ -15699,37 +15727,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 = "2018-02-01" @@ -15738,23 +15767,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 +// GetSwiftVirtualNetworkConnectionSlotResponder handles the response to the GetSwiftVirtualNetworkConnectionSlot 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(), @@ -15765,44 +15794,58 @@ func (client AppsClient) IsCloneableSlotResponder(resp *http.Response) (result S return } -// List get all apps for a subscription. -func (client AppsClient) List(ctx context.Context) (result AppCollectionPage, err error) { +// GetWebJob 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 = "2018-02-01" @@ -15813,21 +15856,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 +// GetTriggeredWebJobResponder handles the response to the GetTriggeredWebJob 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(), @@ -15838,50 +15881,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 gets the application settings of an app. +// GetWebJobSlot 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 { @@ -15895,36 +15904,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 = "2018-02-01" @@ -15933,23 +15944,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 +// GetTriggeredWebJobHistoryResponder handles the response to the GetTriggeredWebJobHistory 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(), @@ -15960,15 +15971,13 @@ func (client AppsClient) ListApplicationSettingsResponder(resp *http.Response) ( return } -// ListApplicationSettingsSlot gets the application settings of an app. +// GetWebSiteContainerLogs 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 { @@ -15982,36 +15991,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), } @@ -16023,38 +16031,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 +// GetTriggeredWebJobHistorySlotResponder handles the response to the GetTriggeredWebJobHistorySlot 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 gets the Azure storage account configurations of an app. +// GetWebSiteContainerLogsSlot 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 { @@ -16068,35 +16076,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), } @@ -16108,44 +16117,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 +// GetTriggeredWebJobSlotResponder handles the response to the GetTriggeredWebJobSlot 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 gets the Azure storage account configurations of an app. +// InstallSiteExtension 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) }() @@ -16155,36 +16162,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), } @@ -16194,44 +16195,53 @@ 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 +// GetVnetConnectionResponder handles the response to the GetVnetConnection 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 gets existing backups of an app. +// InstallSiteExtensionSlot 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. -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 +// 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) 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) }() @@ -16241,35 +16251,1203 @@ 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", "InstallSiteExtensionSlot", err.Error()) } - result.fn = client.listBackupsNextResults - req, err := client.ListBackupsPreparer(ctx, resourceGroupName, name) + req, err := client.InstallSiteExtensionSlotPreparer(ctx, resourceGroupName, name, siteExtensionID, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackups", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "InstallSiteExtensionSlot", nil, "Failure preparing request") return } - resp, err := client.ListBackupsSender(req) + result, err = client.InstallSiteExtensionSlotSender(req) if err != nil { - result.bic.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackups", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "InstallSiteExtensionSlot", result.Response(), "Failure sending request") return } - result.bic, err = client.ListBackupsResponder(resp) + 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 = "2018-02-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 { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackups", resp, "Failure responding to request") + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// 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) { + 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 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) IsCloneable(ctx context.Context, resourceGroupName string, name string) (result SiteCloneability, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.IsCloneable") + 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", "IsCloneable", err.Error()) + } + + req, err := client.IsCloneablePreparer(ctx, resourceGroupName, name) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "IsCloneable", nil, "Failure preparing request") + return + } + + resp, err := client.IsCloneableSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "IsCloneable", resp, "Failure sending request") + return + } + + result, err = client.IsCloneableResponder(resp) + if err != nil { + 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 = "2018-02-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/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...) +} + +// 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) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// IsCloneableSlot 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), + } + + const APIVersion = "2018-02-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/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...) +} + +// 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) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List 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 = "2018-02-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...) +} + +// 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) { + 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 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 = "2018-02-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/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...) +} + +// 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) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListApplicationSettingsSlot 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 = "2018-02-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/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...) +} + +// 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) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListAzureStorageAccounts gets the Azure storage account configurations of an app. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the app. +func (client AppsClient) ListAzureStorageAccounts(ctx context.Context, resourceGroupName string, name string) (result AzureStoragePropertyDictionaryResource, err error) { + if 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 = "2018-02-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAzureStorageAccountsSender sends the ListAzureStorageAccounts request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListAzureStorageAccountsSender(req *http.Request) (*http.Response, error) { + 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 +// closes the http.Response Body. +func (client AppsClient) ListAzureStorageAccountsResponder(resp *http.Response) (result AzureStoragePropertyDictionaryResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListAzureStorageAccountsSlot gets the Azure storage account configurations of an app. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the app. +// slot - name of the deployment slot. If a slot is not specified, the API will update the Azure storage +// account configurations for the production slot. +func (client AppsClient) ListAzureStorageAccountsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result AzureStoragePropertyDictionaryResource, err error) { + if 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 = "2018-02-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAzureStorageAccountsSlotSender sends the ListAzureStorageAccountsSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListAzureStorageAccountsSlotSender(req *http.Request) (*http.Response, error) { + 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) ListAzureStorageAccountsSlotResponder(resp *http.Response) (result AzureStoragePropertyDictionaryResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListBackups gets existing backups of an app. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// 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 = "2018-02-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...) +} + +// 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) { + 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 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 = "2018-02-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...) +} + +// 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) { + 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 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 = "2018-02-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...) +} + +// 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) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListBackupStatusSecretsSlot 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 = "2018-02-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 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), } @@ -16278,25 +17456,28 @@ func (client AppsClient) ListBackupsPreparer(ctx context.Context, resourceGroupN 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 +// ListConfigurationSnapshotInfoSlotResponder handles the response to the ListConfigurationSnapshotInfoSlot 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(), @@ -16307,31 +17488,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 { @@ -16340,23 +17521,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 gets existing backups of an app. +// ListConfigurations 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) }() @@ -16366,37 +17545,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), } @@ -16408,21 +17586,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 +// ListConfigurationsSlotResponder handles the response to the ListConfigurationsSlot 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(), @@ -16433,31 +17611,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 { @@ -16466,25 +17644,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 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 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) }() @@ -16493,44 +17668,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), @@ -16542,25 +17708,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 +// ListConnectionStringsResponder handles the response to the ListConnectionStrings 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(), @@ -16571,121 +17735,57 @@ func (client AppsClient) ListBackupStatusSecretsResponder(resp *http.Response) ( return } -// ListBackupStatusSecretsSlot 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 + return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoNextResults", nil, "Failure preparing next results request") } - - 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") + if req == nil { return } - - result, err = client.ListBackupStatusSecretsSlotResponder(resp) + resp, err := client.ListConfigurationSnapshotInfoSender(req) 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 = "2018-02-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...) + 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 } -// 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 gets all web, mobile, and API apps in the specified resource group. +// ListConfigurationSnapshotInfoSlot 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) }() @@ -16695,35 +17795,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), } @@ -16731,28 +17833,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 +// ListConnectionStringsSlotResponder handles the response to the ListConnectionStringsSlot 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(), @@ -16763,31 +17862,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 { @@ -16796,17 +17895,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 list the configurations of an app +// ListConfigurationsSlot 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 { @@ -16820,36 +17921,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), } @@ -16861,21 +17963,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 +// ListContinuousWebJobsResponder handles the response to the ListContinuousWebJobs 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(), @@ -16886,31 +17988,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 { @@ -16919,22 +18021,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 gets a list of web app configuration snapshots identifiers. Each element of the list -// contains a timestamp and the ID of the snapshot. +// ListConnectionStrings 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) }() @@ -16944,33 +18045,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), @@ -16983,23 +18083,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 +// ListContinuousWebJobsSlotResponder handles the response to the ListContinuousWebJobsSlot 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(), @@ -17010,57 +18110,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 gets a list of web app configuration snapshots identifiers. Each element of the -// list contains a timestamp and the ID of the snapshot. +// ListConnectionStringsSlot 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 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -17070,33 +18132,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), @@ -17110,23 +18171,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 +// ListDeploymentLogResponder handles the response to the ListDeploymentLog 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(), @@ -17137,56 +18198,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 list the configurations of an app +// ListContinuousWebJobs 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) }() @@ -17196,37 +18218,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), } @@ -17238,21 +18259,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 +// ListDeploymentLogSlotResponder handles the response to the ListDeploymentLogSlot 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(), @@ -17263,31 +18284,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 { @@ -17296,21 +18317,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 gets the connection strings of an app. +// ListContinuousWebJobsSlot 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) }() @@ -17320,35 +18343,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), } @@ -17358,23 +18383,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 +// ListDeploymentsResponder handles the response to the ListDeployments 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(), @@ -17385,15 +18410,52 @@ func (client AppsClient) ListConnectionStringsResponder(resp *http.Response) (re return } -// ListConnectionStringsSlot 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 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 { @@ -17407,36 +18469,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), } @@ -17446,23 +18508,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 +// ListDeploymentsSlotResponder handles the response to the ListDeploymentsSlot 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(), @@ -17473,17 +18535,21 @@ func (client AppsClient) ListConnectionStringsSlotResponder(resp *http.Response) return } -// ListContinuousWebJobs list continuous web jobs for an app, or a deployment slot. +// ListDeploymentLogSlot 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) }() @@ -17493,36 +18559,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), } @@ -17534,21 +18601,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(), @@ -17559,56 +18626,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 list continuous web jobs for an app, or a deployment slot. +// ListDeployments 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) }() @@ -17618,37 +18646,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), } @@ -17660,21 +18687,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 +// ListDomainOwnershipIdentifiersSlotResponder handles the response to the ListDomainOwnershipIdentifiersSlot 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(), @@ -17685,31 +18712,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 { @@ -17718,23 +18745,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 list deployment log for specific deployment for an app, or a deployment slot. +// ListDeploymentsSlot 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) }() @@ -17744,36 +18771,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), } @@ -17785,21 +18813,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 +// ListFunctionKeysResponder handles the response to the ListFunctionKeys 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(), @@ -17810,21 +18838,54 @@ func (client AppsClient) ListDeploymentLogResponder(resp *http.Response) (result return } -// ListDeploymentLogSlot 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 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) }() @@ -17834,37 +18895,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), } @@ -17876,21 +18936,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 +// ListFunctionsResponder handles the response to the ListFunctions 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(), @@ -17901,17 +18961,56 @@ func (client AppsClient) ListDeploymentLogSlotResponder(resp *http.Response) (re return } -// ListDeployments 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 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) }() @@ -17921,36 +19020,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), } @@ -17962,21 +19062,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 +// ListFunctionSecretsResponder handles the response to the ListFunctionSecrets 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(), @@ -17987,31 +19087,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 { @@ -18020,23 +19120,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 list deployments for an app, or a deployment slot. +// ListFunctionKeys 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) }() @@ -18046,37 +19145,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), } @@ -18086,23 +19184,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(), @@ -18113,54 +19211,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 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 = "2018-02-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/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 lists ownership identifiers for domain associated with web app. +// ListFunctions 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) }() @@ -18170,33 +19320,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), @@ -18211,56 +19361,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 +// ListFunctionSecretsSlotResponder handles the response to the ListFunctionSecretsSlot 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 { @@ -18269,23 +19419,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 lists ownership identifiers for domain associated with web app. +// ListFunctionSecrets 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) }() @@ -18295,37 +19444,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), } @@ -18335,23 +19483,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 +// ListHostKeysResponder handles the response to the ListHostKeys 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(), @@ -18362,54 +19510,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 list the functions for a web site, or a deployment slot. +// ListFunctionSecretsSlot 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) }() @@ -18419,36 +19532,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), } @@ -18458,78 +19572,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 +// ListHostKeysSlotResponder handles the response to the ListHostKeysSlot request. The method always // closes the http.Response Body. -func (client AppsClient) ListFunctionsResponder(resp *http.Response) (result FunctionEnvelopeCollection, err error) { +func (client AppsClient) ListFunctionSecretsSlotResponder(resp *http.Response) (result FunctionSecrets, 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) + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} return } -// ListFunctionSecrets get function secrets for a function in a web site, or a deployment slot. +// ListHostKeys 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 { @@ -18543,34 +19619,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), @@ -18584,21 +19659,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(), @@ -18609,16 +19684,14 @@ func (client AppsClient) ListFunctionSecretsResponder(resp *http.Response) (resu return } -// ListFunctionSecretsSlot get function secrets for a function in a web site, or a deployment slot. +// ListHostKeysSlot 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. If a slot is not specified, the API deletes a deployment for the -// production slot. -func (client AppsClient) ListFunctionSecretsSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (result FunctionSecrets, err error) { +// slot - name of the deployment slot. +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 { @@ -18632,34 +19705,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), @@ -18674,21 +19746,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(), @@ -19304,8 +20376,7 @@ func (client AppsClient) ListHybridConnectionsSlotResponder(resp *http.Response) // 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. +// slot - name of the deployment slot. func (client AppsClient) ListInstanceFunctionsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result FunctionEnvelopeCollectionPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceFunctionsSlot") @@ -24579,21 +25650,230 @@ func (client AppsClient) ListSnapshotsSlot(ctx context.Context, resourceGroupNam 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") + 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 = "2018-02-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...) +} + +// 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) { + 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 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 = "2018-02-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/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...) +} + +// 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) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListSyncFunctionTriggersSlot 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.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), @@ -24607,23 +25887,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 +// ListSyncStatusSlotResponder handles the response to the ListSyncStatusSlot 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(), @@ -24634,54 +25914,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 this is to allow calling via powershell and ARM template. +// ListSyncStatus 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) }() @@ -24691,32 +25934,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), @@ -24731,44 +25974,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 this is to allow calling via powershell and ARM template. +// ListSyncStatusSlot 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. If a slot is not specified, the API will restore a backup of the -// production slot. -func (client AppsClient) ListSyncFunctionTriggersSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result FunctionSecrets, err error) { +// slot - name of the deployment slot. +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) }() @@ -24778,32 +26019,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), @@ -24819,28 +26060,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 } @@ -29646,7 +30886,177 @@ func (client AppsClient) SwapSlotWithProductionResponder(resp *http.Response) (r return } -// SyncFunctionTriggers syncs function trigger metadata to the scale controller +// SyncFunctions 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 = "2018-02-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/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 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 = "2018-02-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/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 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. @@ -29730,12 +31140,11 @@ func (client AppsClient) SyncFunctionTriggersResponder(resp *http.Response) (res return } -// SyncFunctionTriggersSlot syncs function trigger metadata to the scale controller +// SyncFunctionTriggersSlot 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. If a slot is not specified, the API will restore a backup of the -// production slot. +// slot - name of the deployment slot. func (client AppsClient) SyncFunctionTriggersSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.SyncFunctionTriggersSlot") diff --git a/services/web/mgmt/2018-02-01/web/models.go b/services/web/mgmt/2018-02-01/web/models.go index b8666162d53b..24b150a12227 100644 --- a/services/web/mgmt/2018-02-01/web/models.go +++ b/services/web/mgmt/2018-02-01/web/models.go @@ -9813,7 +9813,7 @@ type FileSystemHTTPLogsConfig struct { Enabled *bool `json:"enabled,omitempty"` } -// FunctionEnvelope web Job Information. +// FunctionEnvelope function information. type FunctionEnvelope struct { autorest.Response `json:"-"` // FunctionEnvelopeProperties - FunctionEnvelope resource specific properties @@ -10056,6 +10056,8 @@ type FunctionEnvelopeProperties struct { ScriptHref *string `json:"script_href,omitempty"` // ConfigHref - Config URI. ConfigHref *string `json:"config_href,omitempty"` + // TestDataHref - Test data URI. + TestDataHref *string `json:"test_data_href,omitempty"` // SecretsFileHref - Secrets file URI. SecretsFileHref *string `json:"secrets_file_href,omitempty"` // Href - Function URI. @@ -10066,6 +10068,12 @@ type FunctionEnvelopeProperties struct { Files map[string]*string `json:"files"` // TestData - Test data used when testing via the Azure Portal. TestData *string `json:"test_data,omitempty"` + // InvokeURLTemplate - The invocation URL + InvokeURLTemplate *string `json:"invoke_url_template,omitempty"` + // Language - The function language + Language *string `json:"language,omitempty"` + // IsDisabled - Value indicating whether the function is disabled + IsDisabled *bool `json:"isDisabled,omitempty"` } // MarshalJSON is the custom marshaler for FunctionEnvelopeProperties. @@ -10083,6 +10091,9 @@ func (fe FunctionEnvelopeProperties) MarshalJSON() ([]byte, error) { if fe.ConfigHref != nil { objectMap["config_href"] = fe.ConfigHref } + if fe.TestDataHref != nil { + objectMap["test_data_href"] = fe.TestDataHref + } if fe.SecretsFileHref != nil { objectMap["secrets_file_href"] = fe.SecretsFileHref } @@ -10098,6 +10109,15 @@ func (fe FunctionEnvelopeProperties) MarshalJSON() ([]byte, error) { if fe.TestData != nil { objectMap["test_data"] = fe.TestData } + if fe.InvokeURLTemplate != nil { + objectMap["invoke_url_template"] = fe.InvokeURLTemplate + } + if fe.Language != nil { + objectMap["language"] = fe.Language + } + if fe.IsDisabled != nil { + objectMap["isDisabled"] = fe.IsDisabled + } return json.Marshal(objectMap) } @@ -10502,6 +10522,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. @@ -11945,6 +11991,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"` +} + // ListCapability ... type ListCapability struct { autorest.Response `json:"-"` diff --git a/services/web/mgmt/2018-02-01/web/webapi/interfaces.go b/services/web/mgmt/2018-02-01/web/webapi/interfaces.go index 10fe2bd43800..fe6234917363 100644 --- a/services/web/mgmt/2018-02-01/web/webapi/interfaces.go +++ b/services/web/mgmt/2018-02-01/web/webapi/interfaces.go @@ -219,8 +219,12 @@ type AppsClientAPI interface { CreateOrUpdateConfigurationSlot(ctx context.Context, resourceGroupName string, name string, siteConfig web.SiteConfigResource, slot string) (result web.SiteConfigResource, err error) CreateOrUpdateDomainOwnershipIdentifier(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, domainOwnershipIdentifier web.Identifier) (result web.Identifier, err error) CreateOrUpdateDomainOwnershipIdentifierSlot(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, domainOwnershipIdentifier web.Identifier, slot string) (result web.Identifier, err error) + CreateOrUpdateFunctionSecret(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, key web.KeyInfo) (result web.KeyInfo, err error) + CreateOrUpdateFunctionSecretSlot(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, slot string, key web.KeyInfo) (result web.KeyInfo, err error) CreateOrUpdateHostNameBinding(ctx context.Context, resourceGroupName string, name string, hostName string, hostNameBinding web.HostNameBinding) (result web.HostNameBinding, err error) CreateOrUpdateHostNameBindingSlot(ctx context.Context, resourceGroupName string, name string, hostName string, hostNameBinding web.HostNameBinding, slot string) (result web.HostNameBinding, err error) + CreateOrUpdateHostSecret(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, key web.KeyInfo) (result web.KeyInfo, err error) + CreateOrUpdateHostSecretSlot(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, slot string, key web.KeyInfo) (result web.KeyInfo, err error) CreateOrUpdateHybridConnection(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope web.HybridConnection) (result web.HybridConnection, err error) CreateOrUpdateHybridConnectionSlot(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope web.HybridConnection, slot string) (result web.HybridConnection, err error) CreateOrUpdatePublicCertificate(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, publicCertificate web.PublicCertificate) (result web.PublicCertificate, err error) @@ -248,8 +252,12 @@ type AppsClientAPI interface { DeleteDomainOwnershipIdentifier(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string) (result autorest.Response, err error) DeleteDomainOwnershipIdentifierSlot(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string) (result autorest.Response, err error) DeleteFunction(ctx context.Context, resourceGroupName string, name string, functionName string) (result autorest.Response, err error) + DeleteFunctionSecret(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string) (result autorest.Response, err error) + DeleteFunctionSecretSlot(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, slot string) (result autorest.Response, err error) DeleteHostNameBinding(ctx context.Context, resourceGroupName string, name string, hostName string) (result autorest.Response, err error) DeleteHostNameBindingSlot(ctx context.Context, resourceGroupName string, name string, slot string, hostName string) (result autorest.Response, err error) + DeleteHostSecret(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string) (result autorest.Response, err error) + DeleteHostSecretSlot(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, slot string) (result autorest.Response, err error) DeleteHybridConnection(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string) (result autorest.Response, err error) DeleteHybridConnectionSlot(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string) (result autorest.Response, err error) DeleteInstanceFunctionSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (result autorest.Response, err error) @@ -398,9 +406,13 @@ type AppsClientAPI interface { ListDeploymentsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.DeploymentCollectionPage, err error) ListDomainOwnershipIdentifiers(ctx context.Context, resourceGroupName string, name string) (result web.IdentifierCollectionPage, err error) ListDomainOwnershipIdentifiersSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.IdentifierCollectionPage, err error) + ListFunctionKeys(ctx context.Context, resourceGroupName string, name string, functionName string) (result web.StringDictionary, err error) + ListFunctionKeysSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (result web.StringDictionary, err error) ListFunctions(ctx context.Context, resourceGroupName string, name string) (result web.FunctionEnvelopeCollectionPage, err error) ListFunctionSecrets(ctx context.Context, resourceGroupName string, name string, functionName string) (result web.FunctionSecrets, err error) ListFunctionSecretsSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (result web.FunctionSecrets, err error) + ListHostKeys(ctx context.Context, resourceGroupName string, name string) (result web.HostKeys, err error) + ListHostKeysSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.HostKeys, err error) ListHostNameBindings(ctx context.Context, resourceGroupName string, name string) (result web.HostNameBindingCollectionPage, err error) ListHostNameBindingsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.HostNameBindingCollectionPage, err error) ListHybridConnectionKeys(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string) (result web.HybridConnectionKey, err error) @@ -456,6 +468,8 @@ type AppsClientAPI interface { ListSnapshotsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.SnapshotCollectionPage, err error) ListSyncFunctionTriggers(ctx context.Context, resourceGroupName string, name string) (result web.FunctionSecrets, err error) ListSyncFunctionTriggersSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result web.FunctionSecrets, err error) + ListSyncStatus(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) + ListSyncStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) ListTriggeredWebJobHistory(ctx context.Context, resourceGroupName string, name string, webJobName string) (result web.TriggeredJobHistoryCollectionPage, err error) ListTriggeredWebJobHistorySlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result web.TriggeredJobHistoryCollectionPage, err error) ListTriggeredWebJobs(ctx context.Context, resourceGroupName string, name string) (result web.TriggeredWebJobCollectionPage, err error) @@ -506,6 +520,8 @@ type AppsClientAPI interface { StopWebSiteNetworkTraceSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) SwapSlotSlot(ctx context.Context, resourceGroupName string, name string, slotSwapEntity web.CsmSlotEntity, slot string) (result web.AppsSwapSlotSlotFuture, err error) SwapSlotWithProduction(ctx context.Context, resourceGroupName string, name string, slotSwapEntity web.CsmSlotEntity) (result web.AppsSwapSlotWithProductionFuture, err error) + SyncFunctions(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) + SyncFunctionsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) SyncFunctionTriggers(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) SyncFunctionTriggersSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) SyncRepository(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error)