diff --git a/profiles/latest/web/mgmt/web/models.go b/profiles/latest/web/mgmt/web/models.go
index 8887df73b59e..f0e47dfad48c 100644
--- a/profiles/latest/web/mgmt/web/models.go
+++ b/profiles/latest/web/mgmt/web/models.go
@@ -472,6 +472,16 @@ const (
WebDeploy PublishingProfileFormat = original.WebDeploy
)
+type RedundancyMode = original.RedundancyMode
+
+const (
+ RedundancyModeActiveActive RedundancyMode = original.RedundancyModeActiveActive
+ RedundancyModeFailover RedundancyMode = original.RedundancyModeFailover
+ RedundancyModeGeoRedundant RedundancyMode = original.RedundancyModeGeoRedundant
+ RedundancyModeManual RedundancyMode = original.RedundancyModeManual
+ RedundancyModeNone RedundancyMode = original.RedundancyModeNone
+)
+
type RenderingType = original.RenderingType
const (
@@ -864,6 +874,7 @@ type FunctionEnvelopeCollectionPage = original.FunctionEnvelopeCollectionPage
type FunctionEnvelopeProperties = original.FunctionEnvelopeProperties
type FunctionSecrets = original.FunctionSecrets
type FunctionSecretsProperties = original.FunctionSecretsProperties
+type GeoDistribution = original.GeoDistribution
type GeoRegion = original.GeoRegion
type GeoRegionCollection = original.GeoRegionCollection
type GeoRegionCollectionIterator = original.GeoRegionCollectionIterator
@@ -1140,6 +1151,7 @@ type UsageCollectionPage = original.UsageCollectionPage
type UsageProperties = original.UsageProperties
type User = original.User
type UserProperties = original.UserProperties
+type ValidateContainerSettingsRequest = original.ValidateContainerSettingsRequest
type ValidateProperties = original.ValidateProperties
type ValidateRequest = original.ValidateRequest
type ValidateResponse = original.ValidateResponse
@@ -1712,6 +1724,9 @@ func PossiblePublicCertificateLocationValues() []PublicCertificateLocation {
func PossiblePublishingProfileFormatValues() []PublishingProfileFormat {
return original.PossiblePublishingProfileFormatValues()
}
+func PossibleRedundancyModeValues() []RedundancyMode {
+ return original.PossibleRedundancyModeValues()
+}
func PossibleRenderingTypeValues() []RenderingType {
return original.PossibleRenderingTypeValues()
}
diff --git a/profiles/preview/web/mgmt/web/models.go b/profiles/preview/web/mgmt/web/models.go
index 8294918430b5..6af38f210a64 100644
--- a/profiles/preview/web/mgmt/web/models.go
+++ b/profiles/preview/web/mgmt/web/models.go
@@ -472,6 +472,16 @@ const (
WebDeploy PublishingProfileFormat = original.WebDeploy
)
+type RedundancyMode = original.RedundancyMode
+
+const (
+ RedundancyModeActiveActive RedundancyMode = original.RedundancyModeActiveActive
+ RedundancyModeFailover RedundancyMode = original.RedundancyModeFailover
+ RedundancyModeGeoRedundant RedundancyMode = original.RedundancyModeGeoRedundant
+ RedundancyModeManual RedundancyMode = original.RedundancyModeManual
+ RedundancyModeNone RedundancyMode = original.RedundancyModeNone
+)
+
type RenderingType = original.RenderingType
const (
@@ -864,6 +874,7 @@ type FunctionEnvelopeCollectionPage = original.FunctionEnvelopeCollectionPage
type FunctionEnvelopeProperties = original.FunctionEnvelopeProperties
type FunctionSecrets = original.FunctionSecrets
type FunctionSecretsProperties = original.FunctionSecretsProperties
+type GeoDistribution = original.GeoDistribution
type GeoRegion = original.GeoRegion
type GeoRegionCollection = original.GeoRegionCollection
type GeoRegionCollectionIterator = original.GeoRegionCollectionIterator
@@ -1140,6 +1151,7 @@ type UsageCollectionPage = original.UsageCollectionPage
type UsageProperties = original.UsageProperties
type User = original.User
type UserProperties = original.UserProperties
+type ValidateContainerSettingsRequest = original.ValidateContainerSettingsRequest
type ValidateProperties = original.ValidateProperties
type ValidateRequest = original.ValidateRequest
type ValidateResponse = original.ValidateResponse
@@ -1712,6 +1724,9 @@ func PossiblePublicCertificateLocationValues() []PublicCertificateLocation {
func PossiblePublishingProfileFormatValues() []PublishingProfileFormat {
return original.PossiblePublishingProfileFormatValues()
}
+func PossibleRedundancyModeValues() []RedundancyMode {
+ return original.PossibleRedundancyModeValues()
+}
func PossibleRenderingTypeValues() []RenderingType {
return original.PossibleRenderingTypeValues()
}
diff --git a/services/web/mgmt/2018-02-01/web/client.go b/services/web/mgmt/2018-02-01/web/client.go
index 339b94008541..cb5a4e9a0c3e 100644
--- a/services/web/mgmt/2018-02-01/web/client.go
+++ b/services/web/mgmt/2018-02-01/web/client.go
@@ -1342,6 +1342,91 @@ func (client BaseClient) ValidateResponder(resp *http.Response) (result Validate
return
}
+// ValidateContainerSettings validate if the container settings are correct.
+// Parameters:
+// resourceGroupName - name of the resource group to which the resource belongs.
+func (client BaseClient) ValidateContainerSettings(ctx context.Context, validateContainerSettingsRequest ValidateContainerSettingsRequest, resourceGroupName string) (result SetObject, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.ValidateContainerSettings")
+ 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.BaseClient", "ValidateContainerSettings", err.Error())
+ }
+
+ req, err := client.ValidateContainerSettingsPreparer(ctx, validateContainerSettingsRequest, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "web.BaseClient", "ValidateContainerSettings", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ValidateContainerSettingsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "web.BaseClient", "ValidateContainerSettings", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ValidateContainerSettingsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "web.BaseClient", "ValidateContainerSettings", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ValidateContainerSettingsPreparer prepares the ValidateContainerSettings request.
+func (client BaseClient) ValidateContainerSettingsPreparer(ctx context.Context, validateContainerSettingsRequest ValidateContainerSettingsRequest, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "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/validateContainerSettings", pathParameters),
+ autorest.WithJSON(validateContainerSettingsRequest),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ValidateContainerSettingsSender sends the ValidateContainerSettings request. The method will close the
+// http.Response Body if it receives an error.
+func (client BaseClient) ValidateContainerSettingsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ValidateContainerSettingsResponder handles the response to the ValidateContainerSettings request. The method always
+// closes the http.Response Body.
+func (client BaseClient) ValidateContainerSettingsResponder(resp *http.Response) (result SetObject, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
// ValidateMove validate whether a resource can be moved.
// Parameters:
// resourceGroupName - name of the resource group to which the resource belongs.
diff --git a/services/web/mgmt/2018-02-01/web/models.go b/services/web/mgmt/2018-02-01/web/models.go
index 5641daaffd90..d5af9ab4b30d 100644
--- a/services/web/mgmt/2018-02-01/web/models.go
+++ b/services/web/mgmt/2018-02-01/web/models.go
@@ -965,6 +965,27 @@ func PossiblePublishingProfileFormatValues() []PublishingProfileFormat {
return []PublishingProfileFormat{FileZilla3, Ftp, WebDeploy}
}
+// RedundancyMode enumerates the values for redundancy mode.
+type RedundancyMode string
+
+const (
+ // RedundancyModeActiveActive ...
+ RedundancyModeActiveActive RedundancyMode = "ActiveActive"
+ // RedundancyModeFailover ...
+ RedundancyModeFailover RedundancyMode = "Failover"
+ // RedundancyModeGeoRedundant ...
+ RedundancyModeGeoRedundant RedundancyMode = "GeoRedundant"
+ // RedundancyModeManual ...
+ RedundancyModeManual RedundancyMode = "Manual"
+ // RedundancyModeNone ...
+ RedundancyModeNone RedundancyMode = "None"
+)
+
+// PossibleRedundancyModeValues returns an array of possible values for the RedundancyMode const type.
+func PossibleRedundancyModeValues() []RedundancyMode {
+ return []RedundancyMode{RedundancyModeActiveActive, RedundancyModeFailover, RedundancyModeGeoRedundant, RedundancyModeManual, RedundancyModeNone}
+}
+
// RenderingType enumerates the values for rendering type.
type RenderingType string
@@ -4342,8 +4363,6 @@ type AppServicePlanPatchResourceProperties struct {
Status StatusOptions `json:"status,omitempty"`
// Subscription - App Service plan subscription.
Subscription *string `json:"subscription,omitempty"`
- // AdminSiteName - App Service plan administration site.
- AdminSiteName *string `json:"adminSiteName,omitempty"`
// HostingEnvironmentProfile - Specification for the App Service Environment to use for the App Service plan.
HostingEnvironmentProfile *HostingEnvironmentProfile `json:"hostingEnvironmentProfile,omitempty"`
// MaximumNumberOfWorkers - Maximum number of instances that can be assigned to this App Service plan.
@@ -4387,8 +4406,6 @@ type AppServicePlanProperties struct {
Status StatusOptions `json:"status,omitempty"`
// Subscription - App Service plan subscription.
Subscription *string `json:"subscription,omitempty"`
- // AdminSiteName - App Service plan administration site.
- AdminSiteName *string `json:"adminSiteName,omitempty"`
// HostingEnvironmentProfile - Specification for the App Service Environment to use for the App Service plan.
HostingEnvironmentProfile *HostingEnvironmentProfile `json:"hostingEnvironmentProfile,omitempty"`
// MaximumNumberOfWorkers - Maximum number of instances that can be assigned to this App Service plan.
@@ -10516,6 +10533,14 @@ type FunctionSecretsProperties struct {
TriggerURL *string `json:"trigger_url,omitempty"`
}
+// GeoDistribution a global distribution definition.
+type GeoDistribution struct {
+ // Location - Location.
+ Location *string `json:"location,omitempty"`
+ // NumberOfWorkers - NumberOfWorkers.
+ NumberOfWorkers *int32 `json:"numberOfWorkers,omitempty"`
+}
+
// GeoRegion geographical region.
type GeoRegion struct {
// GeoRegionProperties - GeoRegion resource specific properties
@@ -11857,6 +11882,12 @@ type IPSecurityRestriction struct {
IPAddress *string `json:"ipAddress,omitempty"`
// SubnetMask - Subnet mask for the range of IP addresses the restriction is valid for.
SubnetMask *string `json:"subnetMask,omitempty"`
+ // VnetSubnetResourceID - Virtual network resource id
+ VnetSubnetResourceID *string `json:"vnetSubnetResourceId,omitempty"`
+ // VnetTrafficTag - (internal) Vnet traffic tag
+ VnetTrafficTag *int32 `json:"vnetTrafficTag,omitempty"`
+ // SubnetTrafficTag - (internal) Subnet traffic tag
+ SubnetTrafficTag *int32 `json:"subnetTrafficTag,omitempty"`
// Action - Allow or Deny access for this IP range.
Action *string `json:"action,omitempty"`
// Tag - Defines what this IP filter will be used for. This is to support IP filtering on proxies. Possible values include: 'Default', 'XffProxy'
@@ -19068,6 +19099,8 @@ type SitePatchResourceProperties struct {
ClientAffinityEnabled *bool `json:"clientAffinityEnabled,omitempty"`
// ClientCertEnabled - true to enable client certificate authentication (TLS mutual authentication); otherwise, false. Default is false.
ClientCertEnabled *bool `json:"clientCertEnabled,omitempty"`
+ // ClientCertExclusionPaths - client certificate authentication comma-separated exclusion paths
+ ClientCertExclusionPaths *string `json:"clientCertExclusionPaths,omitempty"`
// HostNamesDisabled - true to disable the public hostnames of the app; otherwise, false.
// If true, the app is only accessible via API management process.
HostNamesDisabled *bool `json:"hostNamesDisabled,omitempty"`
@@ -19097,6 +19130,12 @@ type SitePatchResourceProperties struct {
// HTTPSOnly - HttpsOnly: configures a web site to accept only https requests. Issues redirect for
// http requests
HTTPSOnly *bool `json:"httpsOnly,omitempty"`
+ // RedundancyMode - Site redundancy mode. Possible values include: 'RedundancyModeNone', 'RedundancyModeManual', 'RedundancyModeFailover', 'RedundancyModeActiveActive', 'RedundancyModeGeoRedundant'
+ RedundancyMode RedundancyMode `json:"redundancyMode,omitempty"`
+ // InProgressOperationID - Specifies an operation id if this site has a pending operation.
+ InProgressOperationID *uuid.UUID `json:"inProgressOperationId,omitempty"`
+ // GeoDistributions - GeoDistributions for this site
+ GeoDistributions *[]GeoDistribution `json:"geoDistributions,omitempty"`
}
// SitePhpErrorLogFlag used for getting PHP error logging flag.
@@ -19250,6 +19289,8 @@ type SiteProperties struct {
ClientAffinityEnabled *bool `json:"clientAffinityEnabled,omitempty"`
// ClientCertEnabled - true to enable client certificate authentication (TLS mutual authentication); otherwise, false. Default is false.
ClientCertEnabled *bool `json:"clientCertEnabled,omitempty"`
+ // ClientCertExclusionPaths - client certificate authentication comma-separated exclusion paths
+ ClientCertExclusionPaths *string `json:"clientCertExclusionPaths,omitempty"`
// HostNamesDisabled - true to disable the public hostnames of the app; otherwise, false.
// If true, the app is only accessible via API management process.
HostNamesDisabled *bool `json:"hostNamesDisabled,omitempty"`
@@ -19279,6 +19320,12 @@ type SiteProperties struct {
// HTTPSOnly - HttpsOnly: configures a web site to accept only https requests. Issues redirect for
// http requests
HTTPSOnly *bool `json:"httpsOnly,omitempty"`
+ // RedundancyMode - Site redundancy mode. Possible values include: 'RedundancyModeNone', 'RedundancyModeManual', 'RedundancyModeFailover', 'RedundancyModeActiveActive', 'RedundancyModeGeoRedundant'
+ RedundancyMode RedundancyMode `json:"redundancyMode,omitempty"`
+ // InProgressOperationID - Specifies an operation id if this site has a pending operation.
+ InProgressOperationID *uuid.UUID `json:"inProgressOperationId,omitempty"`
+ // GeoDistributions - GeoDistributions for this site
+ GeoDistributions *[]GeoDistribution `json:"geoDistributions,omitempty"`
}
// SiteSeal site seal
@@ -20655,6 +20702,8 @@ type StackMinorVersion struct {
RuntimeVersion *string `json:"runtimeVersion,omitempty"`
// IsDefault - true if this is the default minor version; otherwise, false.
IsDefault *bool `json:"isDefault,omitempty"`
+ // IsRemoteDebuggingEnabled - true if this supports Remote Debugging, otherwise false.
+ IsRemoteDebuggingEnabled *bool `json:"isRemoteDebuggingEnabled,omitempty"`
}
// StampCapacity stamp capacity information.
@@ -22660,6 +22709,22 @@ type UserProperties struct {
ScmURI *string `json:"scmUri,omitempty"`
}
+// ValidateContainerSettingsRequest container settings validation request context
+type ValidateContainerSettingsRequest struct {
+ // BaseURL - Base URL of the container registry
+ BaseURL *string `json:"baseUrl,omitempty"`
+ // Username - Username for to access the container registry
+ Username *string `json:"username,omitempty"`
+ // Password - Password for to access the container registry
+ Password *string `json:"password,omitempty"`
+ // Repository - Repository name (image name)
+ Repository *string `json:"repository,omitempty"`
+ // Tag - Image tag
+ Tag *string `json:"tag,omitempty"`
+ // Platform - Platform (windows or linux)
+ Platform *string `json:"platform,omitempty"`
+}
+
// ValidateProperties app properties used for validation.
type ValidateProperties struct {
// ServerFarmID - ARM resource ID of an App Service plan that would host the app.
diff --git a/services/web/mgmt/2018-02-01/web/recommendations.go b/services/web/mgmt/2018-02-01/web/recommendations.go
index 068cb07ff52b..61da186219f0 100644
--- a/services/web/mgmt/2018-02-01/web/recommendations.go
+++ b/services/web/mgmt/2018-02-01/web/recommendations.go
@@ -41,6 +41,91 @@ func NewRecommendationsClientWithBaseURI(baseURI string, subscriptionID string)
return RecommendationsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
+// DisableAllForHostingEnvironment disable all recommendations for an app.
+// Parameters:
+// resourceGroupName - name of the resource group to which the resource belongs.
+// environmentName - name of the app.
+func (client RecommendationsClient) DisableAllForHostingEnvironment(ctx context.Context, resourceGroupName string, environmentName string, hostingEnvironmentName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RecommendationsClient.DisableAllForHostingEnvironment")
+ 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.RecommendationsClient", "DisableAllForHostingEnvironment", err.Error())
+ }
+
+ req, err := client.DisableAllForHostingEnvironmentPreparer(ctx, resourceGroupName, environmentName, hostingEnvironmentName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "web.RecommendationsClient", "DisableAllForHostingEnvironment", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DisableAllForHostingEnvironmentSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "web.RecommendationsClient", "DisableAllForHostingEnvironment", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DisableAllForHostingEnvironmentResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "web.RecommendationsClient", "DisableAllForHostingEnvironment", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DisableAllForHostingEnvironmentPreparer prepares the DisableAllForHostingEnvironment request.
+func (client RecommendationsClient) DisableAllForHostingEnvironmentPreparer(ctx context.Context, resourceGroupName string, environmentName string, hostingEnvironmentName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "hostingEnvironmentName": autorest.Encode("path", hostingEnvironmentName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-02-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ "environmentName": autorest.Encode("query", environmentName),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DisableAllForHostingEnvironmentSender sends the DisableAllForHostingEnvironment request. The method will close the
+// http.Response Body if it receives an error.
+func (client RecommendationsClient) DisableAllForHostingEnvironmentSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// DisableAllForHostingEnvironmentResponder handles the response to the DisableAllForHostingEnvironment request. The method always
+// closes the http.Response Body.
+func (client RecommendationsClient) DisableAllForHostingEnvironmentResponder(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
+}
+
// DisableAllForWebApp disable all recommendations for an app.
// Parameters:
// resourceGroupName - name of the resource group to which the resource belongs.
@@ -125,6 +210,93 @@ func (client RecommendationsClient) DisableAllForWebAppResponder(resp *http.Resp
return
}
+// DisableRecommendationForHostingEnvironment disables the specific rule for a web site permanently.
+// Parameters:
+// resourceGroupName - name of the resource group to which the resource belongs.
+// environmentName - site name
+// name - rule name
+func (client RecommendationsClient) DisableRecommendationForHostingEnvironment(ctx context.Context, resourceGroupName string, environmentName string, name string, hostingEnvironmentName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RecommendationsClient.DisableRecommendationForHostingEnvironment")
+ 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.RecommendationsClient", "DisableRecommendationForHostingEnvironment", err.Error())
+ }
+
+ req, err := client.DisableRecommendationForHostingEnvironmentPreparer(ctx, resourceGroupName, environmentName, name, hostingEnvironmentName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "web.RecommendationsClient", "DisableRecommendationForHostingEnvironment", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DisableRecommendationForHostingEnvironmentSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "web.RecommendationsClient", "DisableRecommendationForHostingEnvironment", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DisableRecommendationForHostingEnvironmentResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "web.RecommendationsClient", "DisableRecommendationForHostingEnvironment", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// DisableRecommendationForHostingEnvironmentPreparer prepares the DisableRecommendationForHostingEnvironment request.
+func (client RecommendationsClient) DisableRecommendationForHostingEnvironmentPreparer(ctx context.Context, resourceGroupName string, environmentName string, name string, hostingEnvironmentName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "hostingEnvironmentName": autorest.Encode("path", hostingEnvironmentName),
+ "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,
+ "environmentName": autorest.Encode("query", environmentName),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DisableRecommendationForHostingEnvironmentSender sends the DisableRecommendationForHostingEnvironment request. The method will close the
+// http.Response Body if it receives an error.
+func (client RecommendationsClient) DisableRecommendationForHostingEnvironmentSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// DisableRecommendationForHostingEnvironmentResponder handles the response to the DisableRecommendationForHostingEnvironment request. The method always
+// closes the http.Response Body.
+func (client RecommendationsClient) DisableRecommendationForHostingEnvironmentResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
// DisableRecommendationForSite disables the specific rule for a web site permanently.
// Parameters:
// resourceGroupName - name of the resource group to which the resource belongs.
@@ -286,6 +458,102 @@ func (client RecommendationsClient) DisableRecommendationForSubscriptionResponde
return
}
+// GetRuleDetailsByHostingEnvironment get a recommendation rule for an app.
+// Parameters:
+// resourceGroupName - name of the resource group to which the resource belongs.
+// hostingEnvironmentName - name of the hosting environment.
+// name - name of the recommendation.
+// updateSeen - specify true to update the last-seen timestamp of the recommendation object.
+// recommendationID - the GUID of the recommendation object if you query an expired one. You don't need to
+// specify it to query an active entry.
+func (client RecommendationsClient) GetRuleDetailsByHostingEnvironment(ctx context.Context, resourceGroupName string, hostingEnvironmentName string, name string, updateSeen *bool, recommendationID string) (result RecommendationRule, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RecommendationsClient.GetRuleDetailsByHostingEnvironment")
+ 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.RecommendationsClient", "GetRuleDetailsByHostingEnvironment", err.Error())
+ }
+
+ req, err := client.GetRuleDetailsByHostingEnvironmentPreparer(ctx, resourceGroupName, hostingEnvironmentName, name, updateSeen, recommendationID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "web.RecommendationsClient", "GetRuleDetailsByHostingEnvironment", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetRuleDetailsByHostingEnvironmentSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "web.RecommendationsClient", "GetRuleDetailsByHostingEnvironment", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetRuleDetailsByHostingEnvironmentResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "web.RecommendationsClient", "GetRuleDetailsByHostingEnvironment", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetRuleDetailsByHostingEnvironmentPreparer prepares the GetRuleDetailsByHostingEnvironment request.
+func (client RecommendationsClient) GetRuleDetailsByHostingEnvironmentPreparer(ctx context.Context, resourceGroupName string, hostingEnvironmentName string, name string, updateSeen *bool, recommendationID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "hostingEnvironmentName": autorest.Encode("path", hostingEnvironmentName),
+ "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,
+ }
+ if updateSeen != nil {
+ queryParameters["updateSeen"] = autorest.Encode("query", *updateSeen)
+ }
+ if len(recommendationID) > 0 {
+ queryParameters["recommendationId"] = autorest.Encode("query", recommendationID)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetRuleDetailsByHostingEnvironmentSender sends the GetRuleDetailsByHostingEnvironment request. The method will close the
+// http.Response Body if it receives an error.
+func (client RecommendationsClient) GetRuleDetailsByHostingEnvironmentSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetRuleDetailsByHostingEnvironmentResponder handles the response to the GetRuleDetailsByHostingEnvironment request. The method always
+// closes the http.Response Body.
+func (client RecommendationsClient) GetRuleDetailsByHostingEnvironmentResponder(resp *http.Response) (result RecommendationRule, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
// GetRuleDetailsByWebApp get a recommendation rule for an app.
// Parameters:
// resourceGroupName - name of the resource group to which the resource belongs.
@@ -504,6 +772,140 @@ func (client RecommendationsClient) ListComplete(ctx context.Context, featured *
return
}
+// ListHistoryForHostingEnvironment get past recommendations for an app, optionally specified by the time range.
+// Parameters:
+// resourceGroupName - name of the resource group to which the resource belongs.
+// hostingEnvironmentName - name of the hosting environment.
+// expiredOnly - specify false to return all recommendations. The default is true,
+// which returns only expired recommendations.
+// filter - filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq
+// 'Notification' and startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq
+// duration'[PT1H|PT1M|P1D]
+func (client RecommendationsClient) ListHistoryForHostingEnvironment(ctx context.Context, resourceGroupName string, hostingEnvironmentName string, expiredOnly *bool, filter string) (result RecommendationCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RecommendationsClient.ListHistoryForHostingEnvironment")
+ defer func() {
+ sc := -1
+ if result.rc.Response.Response != nil {
+ sc = result.rc.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.RecommendationsClient", "ListHistoryForHostingEnvironment", err.Error())
+ }
+
+ result.fn = client.listHistoryForHostingEnvironmentNextResults
+ req, err := client.ListHistoryForHostingEnvironmentPreparer(ctx, resourceGroupName, hostingEnvironmentName, expiredOnly, filter)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "web.RecommendationsClient", "ListHistoryForHostingEnvironment", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListHistoryForHostingEnvironmentSender(req)
+ if err != nil {
+ result.rc.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "web.RecommendationsClient", "ListHistoryForHostingEnvironment", resp, "Failure sending request")
+ return
+ }
+
+ result.rc, err = client.ListHistoryForHostingEnvironmentResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "web.RecommendationsClient", "ListHistoryForHostingEnvironment", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListHistoryForHostingEnvironmentPreparer prepares the ListHistoryForHostingEnvironment request.
+func (client RecommendationsClient) ListHistoryForHostingEnvironmentPreparer(ctx context.Context, resourceGroupName string, hostingEnvironmentName string, expiredOnly *bool, filter string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "hostingEnvironmentName": autorest.Encode("path", hostingEnvironmentName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-02-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if expiredOnly != nil {
+ queryParameters["expiredOnly"] = autorest.Encode("query", *expiredOnly)
+ }
+ if len(filter) > 0 {
+ queryParameters["$filter"] = filter
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListHistoryForHostingEnvironmentSender sends the ListHistoryForHostingEnvironment request. The method will close the
+// http.Response Body if it receives an error.
+func (client RecommendationsClient) ListHistoryForHostingEnvironmentSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListHistoryForHostingEnvironmentResponder handles the response to the ListHistoryForHostingEnvironment request. The method always
+// closes the http.Response Body.
+func (client RecommendationsClient) ListHistoryForHostingEnvironmentResponder(resp *http.Response) (result RecommendationCollection, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listHistoryForHostingEnvironmentNextResults retrieves the next set of results, if any.
+func (client RecommendationsClient) listHistoryForHostingEnvironmentNextResults(ctx context.Context, lastResults RecommendationCollection) (result RecommendationCollection, err error) {
+ req, err := lastResults.recommendationCollectionPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "web.RecommendationsClient", "listHistoryForHostingEnvironmentNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListHistoryForHostingEnvironmentSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "web.RecommendationsClient", "listHistoryForHostingEnvironmentNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListHistoryForHostingEnvironmentResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "web.RecommendationsClient", "listHistoryForHostingEnvironmentNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListHistoryForHostingEnvironmentComplete enumerates all values, automatically crossing page boundaries as required.
+func (client RecommendationsClient) ListHistoryForHostingEnvironmentComplete(ctx context.Context, resourceGroupName string, hostingEnvironmentName string, expiredOnly *bool, filter string) (result RecommendationCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RecommendationsClient.ListHistoryForHostingEnvironment")
+ 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.ListHistoryForHostingEnvironment(ctx, resourceGroupName, hostingEnvironmentName, expiredOnly, filter)
+ return
+}
+
// ListHistoryForWebApp get past recommendations for an app, optionally specified by the time range.
// Parameters:
// resourceGroupName - name of the resource group to which the resource belongs.
@@ -638,6 +1040,139 @@ func (client RecommendationsClient) ListHistoryForWebAppComplete(ctx context.Con
return
}
+// ListRecommendedRulesForHostingEnvironment get all recommendations for an app.
+// Parameters:
+// resourceGroupName - name of the resource group to which the resource belongs.
+// hostingEnvironmentName - name of the app.
+// featured - specify true to return only the most critical recommendations. The default is
+// false, which returns all recommendations.
+// filter - return only channels specified in the filter. Filter is specified by using OData syntax. Example:
+// $filter=channel eq 'Api' or channel eq 'Notification'
+func (client RecommendationsClient) ListRecommendedRulesForHostingEnvironment(ctx context.Context, resourceGroupName string, hostingEnvironmentName string, featured *bool, filter string) (result RecommendationCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RecommendationsClient.ListRecommendedRulesForHostingEnvironment")
+ defer func() {
+ sc := -1
+ if result.rc.Response.Response != nil {
+ sc = result.rc.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.RecommendationsClient", "ListRecommendedRulesForHostingEnvironment", err.Error())
+ }
+
+ result.fn = client.listRecommendedRulesForHostingEnvironmentNextResults
+ req, err := client.ListRecommendedRulesForHostingEnvironmentPreparer(ctx, resourceGroupName, hostingEnvironmentName, featured, filter)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "web.RecommendationsClient", "ListRecommendedRulesForHostingEnvironment", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListRecommendedRulesForHostingEnvironmentSender(req)
+ if err != nil {
+ result.rc.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "web.RecommendationsClient", "ListRecommendedRulesForHostingEnvironment", resp, "Failure sending request")
+ return
+ }
+
+ result.rc, err = client.ListRecommendedRulesForHostingEnvironmentResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "web.RecommendationsClient", "ListRecommendedRulesForHostingEnvironment", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListRecommendedRulesForHostingEnvironmentPreparer prepares the ListRecommendedRulesForHostingEnvironment request.
+func (client RecommendationsClient) ListRecommendedRulesForHostingEnvironmentPreparer(ctx context.Context, resourceGroupName string, hostingEnvironmentName string, featured *bool, filter string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "hostingEnvironmentName": autorest.Encode("path", hostingEnvironmentName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-02-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if featured != nil {
+ queryParameters["featured"] = autorest.Encode("query", *featured)
+ }
+ if len(filter) > 0 {
+ queryParameters["$filter"] = filter
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListRecommendedRulesForHostingEnvironmentSender sends the ListRecommendedRulesForHostingEnvironment request. The method will close the
+// http.Response Body if it receives an error.
+func (client RecommendationsClient) ListRecommendedRulesForHostingEnvironmentSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListRecommendedRulesForHostingEnvironmentResponder handles the response to the ListRecommendedRulesForHostingEnvironment request. The method always
+// closes the http.Response Body.
+func (client RecommendationsClient) ListRecommendedRulesForHostingEnvironmentResponder(resp *http.Response) (result RecommendationCollection, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listRecommendedRulesForHostingEnvironmentNextResults retrieves the next set of results, if any.
+func (client RecommendationsClient) listRecommendedRulesForHostingEnvironmentNextResults(ctx context.Context, lastResults RecommendationCollection) (result RecommendationCollection, err error) {
+ req, err := lastResults.recommendationCollectionPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "web.RecommendationsClient", "listRecommendedRulesForHostingEnvironmentNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListRecommendedRulesForHostingEnvironmentSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "web.RecommendationsClient", "listRecommendedRulesForHostingEnvironmentNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListRecommendedRulesForHostingEnvironmentResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "web.RecommendationsClient", "listRecommendedRulesForHostingEnvironmentNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListRecommendedRulesForHostingEnvironmentComplete enumerates all values, automatically crossing page boundaries as required.
+func (client RecommendationsClient) ListRecommendedRulesForHostingEnvironmentComplete(ctx context.Context, resourceGroupName string, hostingEnvironmentName string, featured *bool, filter string) (result RecommendationCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RecommendationsClient.ListRecommendedRulesForHostingEnvironment")
+ 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.ListRecommendedRulesForHostingEnvironment(ctx, resourceGroupName, hostingEnvironmentName, featured, filter)
+ return
+}
+
// ListRecommendedRulesForWebApp get all recommendations for an app.
// Parameters:
// resourceGroupName - name of the resource group to which the resource belongs.
@@ -842,6 +1377,91 @@ func (client RecommendationsClient) ResetAllFiltersResponder(resp *http.Response
return
}
+// ResetAllFiltersForHostingEnvironment reset all recommendation opt-out settings for an app.
+// Parameters:
+// resourceGroupName - name of the resource group to which the resource belongs.
+// environmentName - name of the app.
+func (client RecommendationsClient) ResetAllFiltersForHostingEnvironment(ctx context.Context, resourceGroupName string, environmentName string, hostingEnvironmentName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RecommendationsClient.ResetAllFiltersForHostingEnvironment")
+ 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.RecommendationsClient", "ResetAllFiltersForHostingEnvironment", err.Error())
+ }
+
+ req, err := client.ResetAllFiltersForHostingEnvironmentPreparer(ctx, resourceGroupName, environmentName, hostingEnvironmentName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "web.RecommendationsClient", "ResetAllFiltersForHostingEnvironment", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ResetAllFiltersForHostingEnvironmentSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "web.RecommendationsClient", "ResetAllFiltersForHostingEnvironment", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ResetAllFiltersForHostingEnvironmentResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "web.RecommendationsClient", "ResetAllFiltersForHostingEnvironment", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ResetAllFiltersForHostingEnvironmentPreparer prepares the ResetAllFiltersForHostingEnvironment request.
+func (client RecommendationsClient) ResetAllFiltersForHostingEnvironmentPreparer(ctx context.Context, resourceGroupName string, environmentName string, hostingEnvironmentName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "hostingEnvironmentName": autorest.Encode("path", hostingEnvironmentName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-02-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ "environmentName": autorest.Encode("query", environmentName),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ResetAllFiltersForHostingEnvironmentSender sends the ResetAllFiltersForHostingEnvironment request. The method will close the
+// http.Response Body if it receives an error.
+func (client RecommendationsClient) ResetAllFiltersForHostingEnvironmentSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ResetAllFiltersForHostingEnvironmentResponder handles the response to the ResetAllFiltersForHostingEnvironment request. The method always
+// closes the http.Response Body.
+func (client RecommendationsClient) ResetAllFiltersForHostingEnvironmentResponder(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
+}
+
// ResetAllFiltersForWebApp reset all recommendation opt-out settings for an app.
// Parameters:
// resourceGroupName - name of the resource group to which the resource belongs.
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 e86242ca72b6..1ea8e600b2d2 100644
--- a/services/web/mgmt/2018-02-01/web/webapi/interfaces.go
+++ b/services/web/mgmt/2018-02-01/web/webapi/interfaces.go
@@ -40,6 +40,7 @@ type BaseClientAPI interface {
UpdatePublishingUser(ctx context.Context, userDetails web.User) (result web.User, err error)
UpdateSourceControl(ctx context.Context, sourceControlType string, requestMessage web.SourceControl) (result web.SourceControl, err error)
Validate(ctx context.Context, resourceGroupName string, validateRequest web.ValidateRequest) (result web.ValidateResponse, err error)
+ ValidateContainerSettings(ctx context.Context, validateContainerSettingsRequest web.ValidateContainerSettingsRequest, resourceGroupName string) (result web.SetObject, err error)
ValidateMove(ctx context.Context, resourceGroupName string, moveResourceEnvelope web.CsmMoveResourceEnvelope) (result autorest.Response, err error)
VerifyHostingEnvironmentVnet(ctx context.Context, parameters web.VnetParameters) (result web.VnetValidationFailureDetails, err error)
}
@@ -174,14 +175,20 @@ var _ ProviderClientAPI = (*web.ProviderClient)(nil)
// RecommendationsClientAPI contains the set of methods on the RecommendationsClient type.
type RecommendationsClientAPI interface {
+ DisableAllForHostingEnvironment(ctx context.Context, resourceGroupName string, environmentName string, hostingEnvironmentName string) (result autorest.Response, err error)
DisableAllForWebApp(ctx context.Context, resourceGroupName string, siteName string) (result autorest.Response, err error)
+ DisableRecommendationForHostingEnvironment(ctx context.Context, resourceGroupName string, environmentName string, name string, hostingEnvironmentName string) (result autorest.Response, err error)
DisableRecommendationForSite(ctx context.Context, resourceGroupName string, siteName string, name string) (result autorest.Response, err error)
DisableRecommendationForSubscription(ctx context.Context, name string) (result autorest.Response, err error)
+ GetRuleDetailsByHostingEnvironment(ctx context.Context, resourceGroupName string, hostingEnvironmentName string, name string, updateSeen *bool, recommendationID string) (result web.RecommendationRule, err error)
GetRuleDetailsByWebApp(ctx context.Context, resourceGroupName string, siteName string, name string, updateSeen *bool, recommendationID string) (result web.RecommendationRule, err error)
List(ctx context.Context, featured *bool, filter string) (result web.RecommendationCollectionPage, err error)
+ ListHistoryForHostingEnvironment(ctx context.Context, resourceGroupName string, hostingEnvironmentName string, expiredOnly *bool, filter string) (result web.RecommendationCollectionPage, err error)
ListHistoryForWebApp(ctx context.Context, resourceGroupName string, siteName string, expiredOnly *bool, filter string) (result web.RecommendationCollectionPage, err error)
+ ListRecommendedRulesForHostingEnvironment(ctx context.Context, resourceGroupName string, hostingEnvironmentName string, featured *bool, filter string) (result web.RecommendationCollectionPage, err error)
ListRecommendedRulesForWebApp(ctx context.Context, resourceGroupName string, siteName string, featured *bool, filter string) (result web.RecommendationCollectionPage, err error)
ResetAllFilters(ctx context.Context) (result autorest.Response, err error)
+ ResetAllFiltersForHostingEnvironment(ctx context.Context, resourceGroupName string, environmentName string, hostingEnvironmentName string) (result autorest.Response, err error)
ResetAllFiltersForWebApp(ctx context.Context, resourceGroupName string, siteName string) (result autorest.Response, err error)
}