diff --git a/profiles/latest/web/mgmt/web/models.go b/profiles/latest/web/mgmt/web/models.go index 0120488714d2..a7221988266a 100644 --- a/profiles/latest/web/mgmt/web/models.go +++ b/profiles/latest/web/mgmt/web/models.go @@ -863,6 +863,8 @@ type DomainRegistrationProviderClient = original.DomainRegistrationProviderClien type DomainsClient = original.DomainsClient type DomainsCreateOrUpdateFuture = original.DomainsCreateOrUpdateFuture type EnabledConfig = original.EnabledConfig +type EndpointDependency = original.EndpointDependency +type EndpointDetail = original.EndpointDetail type ErrorEntity = original.ErrorEntity type Experiments = original.Experiments type FileSystemApplicationLogsConfig = original.FileSystemApplicationLogsConfig @@ -908,6 +910,7 @@ type IdentifierCollection = original.IdentifierCollection type IdentifierCollectionIterator = original.IdentifierCollectionIterator type IdentifierCollectionPage = original.IdentifierCollectionPage type IdentifierProperties = original.IdentifierProperties +type InboundEnvironmentEndpoint = original.InboundEnvironmentEndpoint type Job = original.Job type JobCollection = original.JobCollection type JobCollectionIterator = original.JobCollectionIterator @@ -917,8 +920,10 @@ type ListCapability = original.ListCapability type ListCertificateEmail = original.ListCertificateEmail type ListCertificateOrderAction = original.ListCertificateOrderAction type ListHostingEnvironmentDiagnostics = original.ListHostingEnvironmentDiagnostics +type ListInboundEnvironmentEndpoint = original.ListInboundEnvironmentEndpoint type ListNetworkTrace = original.ListNetworkTrace type ListOperation = original.ListOperation +type ListOutboundEnvironmentEndpoint = original.ListOutboundEnvironmentEndpoint type ListVnetInfo = original.ListVnetInfo type ListVnetRoute = original.ListVnetRoute type LocalizableString = original.LocalizableString @@ -951,6 +956,7 @@ type NetworkFeatures = original.NetworkFeatures type NetworkFeaturesProperties = original.NetworkFeaturesProperties type NetworkTrace = original.NetworkTrace type Operation = original.Operation +type OutboundEnvironmentEndpoint = original.OutboundEnvironmentEndpoint type PerfMonCounterCollection = original.PerfMonCounterCollection type PerfMonCounterCollectionIterator = original.PerfMonCounterCollectionIterator type PerfMonCounterCollectionPage = original.PerfMonCounterCollectionPage diff --git a/profiles/preview/web/mgmt/web/models.go b/profiles/preview/web/mgmt/web/models.go index 84ac2b431522..8b9574d16897 100644 --- a/profiles/preview/web/mgmt/web/models.go +++ b/profiles/preview/web/mgmt/web/models.go @@ -863,6 +863,8 @@ type DomainRegistrationProviderClient = original.DomainRegistrationProviderClien type DomainsClient = original.DomainsClient type DomainsCreateOrUpdateFuture = original.DomainsCreateOrUpdateFuture type EnabledConfig = original.EnabledConfig +type EndpointDependency = original.EndpointDependency +type EndpointDetail = original.EndpointDetail type ErrorEntity = original.ErrorEntity type Experiments = original.Experiments type FileSystemApplicationLogsConfig = original.FileSystemApplicationLogsConfig @@ -908,6 +910,7 @@ type IdentifierCollection = original.IdentifierCollection type IdentifierCollectionIterator = original.IdentifierCollectionIterator type IdentifierCollectionPage = original.IdentifierCollectionPage type IdentifierProperties = original.IdentifierProperties +type InboundEnvironmentEndpoint = original.InboundEnvironmentEndpoint type Job = original.Job type JobCollection = original.JobCollection type JobCollectionIterator = original.JobCollectionIterator @@ -917,8 +920,10 @@ type ListCapability = original.ListCapability type ListCertificateEmail = original.ListCertificateEmail type ListCertificateOrderAction = original.ListCertificateOrderAction type ListHostingEnvironmentDiagnostics = original.ListHostingEnvironmentDiagnostics +type ListInboundEnvironmentEndpoint = original.ListInboundEnvironmentEndpoint type ListNetworkTrace = original.ListNetworkTrace type ListOperation = original.ListOperation +type ListOutboundEnvironmentEndpoint = original.ListOutboundEnvironmentEndpoint type ListVnetInfo = original.ListVnetInfo type ListVnetRoute = original.ListVnetRoute type LocalizableString = original.LocalizableString @@ -951,6 +956,7 @@ type NetworkFeatures = original.NetworkFeatures type NetworkFeaturesProperties = original.NetworkFeaturesProperties type NetworkTrace = original.NetworkTrace type Operation = original.Operation +type OutboundEnvironmentEndpoint = original.OutboundEnvironmentEndpoint type PerfMonCounterCollection = original.PerfMonCounterCollection type PerfMonCounterCollectionIterator = original.PerfMonCounterCollectionIterator type PerfMonCounterCollectionPage = original.PerfMonCounterCollectionPage diff --git a/services/web/mgmt/2018-02-01/web/appserviceenvironments.go b/services/web/mgmt/2018-02-01/web/appserviceenvironments.go index a954295efb90..bd876c788a0b 100644 --- a/services/web/mgmt/2018-02-01/web/appserviceenvironments.go +++ b/services/web/mgmt/2018-02-01/web/appserviceenvironments.go @@ -705,6 +705,92 @@ func (client AppServiceEnvironmentsClient) GetDiagnosticsItemResponder(resp *htt return } +// GetInboundNetworkDependenciesEndpoints get the network endpoints of all inbound dependencies of an App Service +// Environment. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the App Service Environment. +func (client AppServiceEnvironmentsClient) GetInboundNetworkDependenciesEndpoints(ctx context.Context, resourceGroupName string, name string) (result ListInboundEnvironmentEndpoint, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppServiceEnvironmentsClient.GetInboundNetworkDependenciesEndpoints") + 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.AppServiceEnvironmentsClient", "GetInboundNetworkDependenciesEndpoints", err.Error()) + } + + req, err := client.GetInboundNetworkDependenciesEndpointsPreparer(ctx, resourceGroupName, name) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "GetInboundNetworkDependenciesEndpoints", nil, "Failure preparing request") + return + } + + resp, err := client.GetInboundNetworkDependenciesEndpointsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "GetInboundNetworkDependenciesEndpoints", resp, "Failure sending request") + return + } + + result, err = client.GetInboundNetworkDependenciesEndpointsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "GetInboundNetworkDependenciesEndpoints", resp, "Failure responding to request") + } + + return +} + +// GetInboundNetworkDependenciesEndpointsPreparer prepares the GetInboundNetworkDependenciesEndpoints request. +func (client AppServiceEnvironmentsClient) GetInboundNetworkDependenciesEndpointsPreparer(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/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetInboundNetworkDependenciesEndpointsSender sends the GetInboundNetworkDependenciesEndpoints request. The method will close the +// http.Response Body if it receives an error. +func (client AppServiceEnvironmentsClient) GetInboundNetworkDependenciesEndpointsSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// GetInboundNetworkDependenciesEndpointsResponder handles the response to the GetInboundNetworkDependenciesEndpoints request. The method always +// closes the http.Response Body. +func (client AppServiceEnvironmentsClient) GetInboundNetworkDependenciesEndpointsResponder(resp *http.Response) (result ListInboundEnvironmentEndpoint, 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 +} + // GetMultiRolePool get properties of a multi-role pool. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. @@ -790,6 +876,92 @@ func (client AppServiceEnvironmentsClient) GetMultiRolePoolResponder(resp *http. return } +// GetOutboundNetworkDependenciesEndpoints get the network endpoints of all outbound dependencies of an App Service +// Environment. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the App Service Environment. +func (client AppServiceEnvironmentsClient) GetOutboundNetworkDependenciesEndpoints(ctx context.Context, resourceGroupName string, name string) (result ListOutboundEnvironmentEndpoint, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AppServiceEnvironmentsClient.GetOutboundNetworkDependenciesEndpoints") + 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.AppServiceEnvironmentsClient", "GetOutboundNetworkDependenciesEndpoints", err.Error()) + } + + req, err := client.GetOutboundNetworkDependenciesEndpointsPreparer(ctx, resourceGroupName, name) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "GetOutboundNetworkDependenciesEndpoints", nil, "Failure preparing request") + return + } + + resp, err := client.GetOutboundNetworkDependenciesEndpointsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "GetOutboundNetworkDependenciesEndpoints", resp, "Failure sending request") + return + } + + result, err = client.GetOutboundNetworkDependenciesEndpointsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsClient", "GetOutboundNetworkDependenciesEndpoints", resp, "Failure responding to request") + } + + return +} + +// GetOutboundNetworkDependenciesEndpointsPreparer prepares the GetOutboundNetworkDependenciesEndpoints request. +func (client AppServiceEnvironmentsClient) GetOutboundNetworkDependenciesEndpointsPreparer(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/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetOutboundNetworkDependenciesEndpointsSender sends the GetOutboundNetworkDependenciesEndpoints request. The method will close the +// http.Response Body if it receives an error. +func (client AppServiceEnvironmentsClient) GetOutboundNetworkDependenciesEndpointsSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// GetOutboundNetworkDependenciesEndpointsResponder handles the response to the GetOutboundNetworkDependenciesEndpoints request. The method always +// closes the http.Response Body. +func (client AppServiceEnvironmentsClient) GetOutboundNetworkDependenciesEndpointsResponder(resp *http.Response) (result ListOutboundEnvironmentEndpoint, 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 +} + // GetWorkerPool get properties of a worker pool. // 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 bdca052f48d4..419c43da1364 100644 --- a/services/web/mgmt/2018-02-01/web/models.go +++ b/services/web/mgmt/2018-02-01/web/models.go @@ -10090,6 +10090,28 @@ type EnabledConfig struct { Enabled *bool `json:"enabled,omitempty"` } +// EndpointDependency a domain name that a service is reached at, including details of the current +// connection status. +type EndpointDependency struct { + // DomainName - The domain name of the dependency. + DomainName *string `json:"domainName,omitempty"` + // EndpointDetails - The IP Addresses and Ports used when connecting to DomainName. + EndpointDetails *[]EndpointDetail `json:"endpointDetails,omitempty"` +} + +// EndpointDetail current TCP connectivity information from the App Service Environment to a single +// endpoint. +type EndpointDetail struct { + // IPAddress - An IP Address that Domain Name currently resolves to. + IPAddress *string `json:"ipAddress,omitempty"` + // Port - The port an endpoint is connected to. + Port *int32 `json:"port,omitempty"` + // Latency - The time in milliseconds it takes for a TCP connection to be created from the App Service Environment to this IpAddress at this Port. + Latency *float64 `json:"latency,omitempty"` + // IsAccessable - Whether it is possible to create a TCP connection from the App Service Environment to this IpAddress at this Port. + IsAccessable *bool `json:"isAccessable,omitempty"` +} + // ErrorEntity body of the error response returned from the API. type ErrorEntity struct { // ExtendedCode - Type of error. @@ -11873,6 +11895,17 @@ type IdentifierProperties struct { ID *string `json:"id,omitempty"` } +// InboundEnvironmentEndpoint the IP Addresses and Ports that require inbound network access to and within +// the subnet of the App Service Environment. +type InboundEnvironmentEndpoint struct { + // Description - Short text describing the purpose of the network traffic. + Description *string `json:"description,omitempty"` + // Endpoints - The IP addresses that network traffic will originate from in cidr notation. + Endpoints *[]string `json:"endpoints,omitempty"` + // Ports - The ports that network traffic will arrive to the App Service Environment at. + Ports *[]string `json:"ports,omitempty"` +} + // IPSecurityRestriction IP security restriction on an app. type IPSecurityRestriction struct { // IPAddress - IP address the security restriction is valid for. @@ -12211,6 +12244,12 @@ type ListHostingEnvironmentDiagnostics struct { Value *[]HostingEnvironmentDiagnostics `json:"value,omitempty"` } +// ListInboundEnvironmentEndpoint ... +type ListInboundEnvironmentEndpoint struct { + autorest.Response `json:"-"` + Value *[]InboundEnvironmentEndpoint `json:"value,omitempty"` +} + // ListNetworkTrace ... type ListNetworkTrace struct { autorest.Response `json:"-"` @@ -12223,6 +12262,12 @@ type ListOperation struct { Value *[]Operation `json:"value,omitempty"` } +// ListOutboundEnvironmentEndpoint ... +type ListOutboundEnvironmentEndpoint struct { + autorest.Response `json:"-"` + Value *[]OutboundEnvironmentEndpoint `json:"value,omitempty"` +} + // ListVnetInfo ... type ListVnetInfo struct { autorest.Response `json:"-"` @@ -13316,6 +13361,15 @@ type Operation struct { GeoMasterOperationID *uuid.UUID `json:"geoMasterOperationId,omitempty"` } +// OutboundEnvironmentEndpoint endpoints accessed for a common purpose that the App Service Environment +// requires outbound network access to. +type OutboundEnvironmentEndpoint struct { + // Category - The type of service accessed by the App Service Environment, e.g., Azure Storage, Azure SQL Database, and Azure Active Directory. + Category *string `json:"category,omitempty"` + // Endpoints - The endpoints that the App Service Environment reaches the service at. + Endpoints *[]EndpointDependency `json:"endpoints,omitempty"` +} + // PerfMonCounterCollection collection of performance monitor counters. type PerfMonCounterCollection 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 1ea8e600b2d2..4286cbad75ec 100644 --- a/services/web/mgmt/2018-02-01/web/webapi/interfaces.go +++ b/services/web/mgmt/2018-02-01/web/webapi/interfaces.go @@ -558,7 +558,9 @@ type AppServiceEnvironmentsClientAPI interface { Delete(ctx context.Context, resourceGroupName string, name string, forceDelete *bool) (result web.AppServiceEnvironmentsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, name string) (result web.AppServiceEnvironmentResource, err error) GetDiagnosticsItem(ctx context.Context, resourceGroupName string, name string, diagnosticsName string) (result web.HostingEnvironmentDiagnostics, err error) + GetInboundNetworkDependenciesEndpoints(ctx context.Context, resourceGroupName string, name string) (result web.ListInboundEnvironmentEndpoint, err error) GetMultiRolePool(ctx context.Context, resourceGroupName string, name string) (result web.WorkerPoolResource, err error) + GetOutboundNetworkDependenciesEndpoints(ctx context.Context, resourceGroupName string, name string) (result web.ListOutboundEnvironmentEndpoint, err error) GetWorkerPool(ctx context.Context, resourceGroupName string, name string, workerPoolName string) (result web.WorkerPoolResource, err error) List(ctx context.Context) (result web.AppServiceEnvironmentCollectionPage, err error) ListAppServicePlans(ctx context.Context, resourceGroupName string, name string) (result web.AppServicePlanCollectionPage, err error)